diff src/audacious/ui_fileinfopopup.c @ 2484:adc63272c9ff trunk

[svn] - add some debugging assertions to this code
author nenolod
date Wed, 07 Feb 2007 10:23:29 -0800
parents 44df6c17411b
children ba8c2a94262c
line wrap: on
line diff
--- a/src/audacious/ui_fileinfopopup.c	Wed Feb 07 10:06:49 2007 -0800
+++ b/src/audacious/ui_fileinfopopup.c	Wed Feb 07 10:23:29 2007 -0800
@@ -93,7 +93,7 @@
 {
 	GtkWidget *widget = g_object_get_data(G_OBJECT(filepopup_win), entry_name);
 
-	if (widget == NULL)
+	if (widget == NULL || text == NULL)
 		return;
 
 	gtk_label_set_text(GTK_LABEL(widget), text);
@@ -113,11 +113,17 @@
   gint time;
 
   pl = playlist_get_active();
+
+  g_return_if_fail(pl != NULL);
+
   pos = playlist_get_position(pl);
 
   current_file = playlist_get_filename( pl , pos );
   time = playback_get_time();
 
+  if (current_file == NULL)
+      return FALSE;
+
   if ( ( time != -1 ) &&
        ( length != -1 ) &&
        ( ( current_file != NULL ) && ( tooltip_file != NULL ) &&