[SF#683]Fix crash if 'volumealsa' plugin initialization failed.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 23 Oct 2014 16:31:20 +0000 (19:31 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 23 Oct 2014 16:31:20 +0000 (19:31 +0300)
ChangeLog
plugins/volumealsa/volumealsa.c

index 02a1034..6b7332f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
 * Fixed positioning of new created panel, the edge was not saved.
 * Eliminated hardcoded "xterm" in 'volumealsa' plugin - LibFM has enough
     means to call terminal when needed.
+* Fixed crash if 'volumealsa' plugin initialization failed.
 
 0.7.1
 -------------------------------------------------------------------------
index 7183098..6a7b841 100644 (file)
@@ -577,8 +577,9 @@ static void volumealsa_destructor(gpointer user_data)
     if (vol->restart_idle)
         g_source_remove(vol->restart_idle);
 
-    g_signal_handlers_disconnect_by_func(panel_get_icon_theme(vol->panel),
-                                         volumealsa_theme_change, vol);
+    if (vol->panel) /* SF bug #683: crash if constructor failed */
+        g_signal_handlers_disconnect_by_func(panel_get_icon_theme(vol->panel),
+                                             volumealsa_theme_change, vol);
 
     /* Deallocate all memory. */
     g_free(vol);