diff audacious/input.c @ 1672:600efc52c645 trunk

[svn] - be careful about referencing a NULL widget (e.g. headless/serveronly mode crashes on streams, bug #562)
author nenolod
date Tue, 12 Sep 2006 23:11:07 -0700
parents a6e6d3500c13
children 3434eb44b304
line wrap: on
line diff
--- a/audacious/input.c	Tue Sep 12 10:59:59 2006 -0700
+++ b/audacious/input.c	Tue Sep 12 23:11:07 2006 -0700
@@ -760,8 +760,11 @@
 
     ip_data.buffering = status;
 
-    if (ip_data.buffering == TRUE && mainwin_playstatus->ps_status == STATUS_STOP)
+    g_return_if_fail(mainwin_playstatus != NULL);
+
+    if (ip_data.buffering == TRUE && mainwin_playstatus != NULL && mainwin_playstatus->ps_status == STATUS_STOP)
         mainwin_playstatus->ps_status = STATUS_PLAY;
+
     playstatus_set_status_buffering(mainwin_playstatus, ip_data.buffering);
 }