changeset 1195:8a2a9ec122f0 trunk

Branch merge
author calin.crisan@ldev-006
date Thu, 21 Jun 2007 17:55:58 +0300
parents bf57aa1dc503 (current diff) 16413a86172c (diff)
children 1e1cd00878c8
files
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/cue/cuesheet.c	Thu Jun 21 17:42:48 2007 +0300
+++ b/src/cue/cuesheet.c	Thu Jun 21 17:55:58 2007 +0300
@@ -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);