diff src/audacious/ui_fileinfopopup.c @ 2516:a2b862cb4269 trunk

[svn] - avoid double free while playing cdda.
author yaz
date Wed, 14 Feb 2007 06:42:50 -0800
parents ba8c2a94262c
children 98d02ad44f3b
line wrap: on
line diff
--- a/src/audacious/ui_fileinfopopup.c	Tue Feb 13 13:22:51 2007 -0800
+++ b/src/audacious/ui_fileinfopopup.c	Wed Feb 14 06:42:50 2007 -0800
@@ -379,8 +379,12 @@
 	if (tuple == NULL)
 		return;
 
-	if ( g_object_get_data( G_OBJECT(filepopup_win) , "file" ) != NULL )
-	  g_free( g_object_get_data( G_OBJECT(filepopup_win) , "file" ) );
+	tmp = g_object_get_data( G_OBJECT(filepopup_win) , "file" );
+	if ( tmp != NULL ) {
+		g_free( tmp );
+		tmp = NULL;
+		g_object_set_data( G_OBJECT(filepopup_win) , "file" , NULL );
+	}
 	if ( ( tuple->file_path ) && ( tuple->file_name ) )
 	{
 		g_object_set_data( G_OBJECT(filepopup_win) , "file" ,