Fix incomplete resources deallocation in 'volumealsa' plugin.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 20 Sep 2014 19:44:01 +0000 (22:44 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 20 Sep 2014 19:44:01 +0000 (22:44 +0300)
It brings crash after plugin deleted from panel then theme changed.

ChangeLog
plugins/volumealsa/volumealsa.c

index c497bd9..88f0804 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
 * Now 'volumealsa' checks for 'MixerCommand' setting in the configuration
     before gusssing it.
 * Fixed color saving in the configuration.
+* Fixed incomplete resources deallocation in 'volumealsa' plugin.
 
 0.7.0
 -------------------------------------------------------------------------
index 07f33de..04b4317 100644 (file)
@@ -569,6 +569,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);
+
     /* Deallocate all memory. */
     g_free(vol);
 }