changeset 310:86b52a87ba33 trunk

[svn] - get_song_info() in some plugins, typically wav, would crash with NULL argument.
author yaz
date Sun, 26 Nov 2006 00:50:00 -0800
parents b7aab7965968
children 4ddab3548cd0
files ChangeLog src/cue/cuesheet.c
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Nov 25 20:10:34 2006 -0800
+++ b/ChangeLog	Sun Nov 26 00:50:00 2006 -0800
@@ -1,3 +1,11 @@
+2006-11-26 04:10:34 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [674]
+  - fix
+  
+  trunk/src/cue/cuesheet.c |    1 +
+  1 file changed, 1 insertion(+)
+
+
 2006-11-26 03:48:27 +0000  William Pitcock <nenolod@nenolod.net>
   revision [672]
   - cuesheet plugin improvements via hiro @ audacious boards
--- a/src/cue/cuesheet.c	Sat Nov 25 20:10:34 2006 -0800
+++ b/src/cue/cuesheet.c	Sun Nov 26 00:50:00 2006 -0800
@@ -283,6 +283,7 @@
         gchar *_path = strchr(path2, '?');
 	gint file_length = 0;
 	gint track = 0;
+	gchar *dummy = NULL;
 
         if (_path != NULL && *_path == '?')
         {
@@ -304,7 +305,8 @@
 		real_ip->output = cue_ip.output;
 		real_ip->play_file(cue_file);
 		real_ip->seek(finetune_seek ? finetune_seek / 1000 : cue_tracks[track].index / 1000 + 1);
-		real_ip->get_song_info(cue_file, NULL, &file_length);
+		real_ip->get_song_info(cue_file, &dummy, &file_length); // in some plugins, NULL as 2nd arg caauses crash.
+		g_free(dummy);
 		cue_tracks[last_cue_track].index = file_length;
 	}