# HG changeset patch # User Mark Doliner # Date 1059242725 0 # Node ID bf63ddea431f53644d0b7a466972cc5ad2ac0672 # Parent a21cf07cd8e126c6244beaf82b28b42046a09ab0 [gaim-migrate @ 6808] Make Gaim not crash when you unload the system tray icon when there are messages queued. committer: Tailor Script diff -r a21cf07cd8e1 -r bf63ddea431f plugins/docklet/docklet.c --- a/plugins/docklet/docklet.c Sat Jul 26 17:48:50 2003 +0000 +++ b/plugins/docklet/docklet.c Sat Jul 26 18:05:25 2003 +0000 @@ -54,6 +54,7 @@ GaimPlugin *handle = NULL; static struct docklet_ui_ops *ui_ops = NULL; static enum docklet_status status = offline; +static guint blinktimer = 0; #ifdef _WIN32 __declspec(dllimport) GSList *unread_message_queue; __declspec(dllimport) GSList *away_messages; @@ -263,7 +264,7 @@ /* and schedule the blinker function if messages are pending */ if (status == online_pending || status == away_pending) { - g_timeout_add(500, docklet_blink_icon, NULL); + blinktimer = g_timeout_add(500, docklet_blink_icon, NULL); } } @@ -439,6 +440,9 @@ static gboolean plugin_unload(GaimPlugin *plugin) { + if (blinktimer != 0) + g_source_remove(blinktimer); + if (ui_ops->destroy) ui_ops->destroy();