From 5f65db18ba5669767847d517e49c68a6d943febc Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 8 Aug 2010 12:29:04 +0000 Subject: [PATCH] Avoid crashes when unloading --- src/plugins/panel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/panel.c b/src/plugins/panel.c index e694183..dfa03f6 100644 --- a/src/plugins/panel.c +++ b/src/plugins/panel.c @@ -200,7 +200,10 @@ static int _panel_destroy(PhonePlugin * plugin) { Panel * panel = plugin->priv; - _on_plug_embedded(panel); + if(panel->battery_timeout != 0) + g_source_remove(panel->battery_timeout); + if(panel->timeout != 0) + g_source_remove(panel->timeout); gtk_widget_destroy(panel->hbox); return 0; }