# HG changeset patch # User Yoshiki Yazawa # Date 1182427235 -32400 # Node ID 16413a86172ca205628fbf2aae6f6e0bde9d6edf # Parent 1cb26b6f7ba09e8980dbce0495d9a2fc21432797 fix for crash when the file pointed in a cuesheet does not exist. closes #978. diff -r 1cb26b6f7ba0 -r 16413a86172c src/cue/cuesheet.c --- a/src/cue/cuesheet.c Thu Jun 21 11:37:29 2007 +0100 +++ b/src/cue/cuesheet.c Thu Jun 21 21:00:35 2007 +0900 @@ -259,9 +259,15 @@ out = bmp_title_input_new(); - out->file_path = g_strdup(phys_tuple->file_path); - out->file_name = g_strdup(phys_tuple->file_name); - out->file_ext = g_strdup(phys_tuple->file_ext); + if(!phys_tuple) + return out; + + if(phys_tuple->file_path) + out->file_path = g_strdup(phys_tuple->file_path); + if(phys_tuple->file_name) + out->file_name = g_strdup(phys_tuple->file_name); + if(phys_tuple->file_ext) + out->file_ext = g_strdup(phys_tuple->file_ext); out->length = phys_tuple->length; bmp_title_input_free(phys_tuple); @@ -441,7 +447,7 @@ cur_cue_track = track; cache_cue_file(path2); - if (cue_file == NULL) + if (cue_file == NULL || !g_file_test(cue_file, G_FILE_TEST_EXISTS)) return; real_ip_plugin = input_check_file(cue_file, FALSE);