r7258 - dumbhippo/trunk/client/linux/src



Author: otaylor
Date: 2008-01-25 09:45:47 -0600 (Fri, 25 Jan 2008)
New Revision: 7258

Modified:
   dumbhippo/trunk/client/linux/src/hippo-status-icon.c
Log:
Avoid g_object_set() during finalization

Modified: dumbhippo/trunk/client/linux/src/hippo-status-icon.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-status-icon.c	2008-01-25 03:25:05 UTC (rev 7257)
+++ dumbhippo/trunk/client/linux/src/hippo-status-icon.c	2008-01-25 15:45:47 UTC (rev 7258)
@@ -77,7 +77,8 @@
 
 static void
 set_global_resource(HippoStatusIcon *icon,
-                    DDMDataResource *global_resource)
+                    DDMDataResource *global_resource,
+                    gboolean         in_finalization)
 {
     if (icon->global_resource) {
         ddm_data_resource_disconnect(icon->global_resource,
@@ -96,7 +97,8 @@
                                   icon);
     }
 
-    on_online_changed(icon->global_resource, NULL, icon);
+    if (!in_finalization)
+        on_online_changed(icon->global_resource, NULL, icon);
 }
 
 static void
@@ -104,7 +106,8 @@
          HippoStatusIcon *icon)
 {
     set_global_resource(icon,
-                        ddm_data_model_get_global_resource(model));
+                        ddm_data_model_get_global_resource(model),
+                        FALSE);
 }
 
 HippoStatusIcon*
@@ -141,7 +144,7 @@
 {
     HippoStatusIcon *icon = HIPPO_STATUS_ICON(object);
 
-    set_global_resource(icon, NULL);
+    set_global_resource(icon, NULL, TRUE);
     destroy_menu(icon);
 
     g_signal_handlers_disconnect_by_func(icon->model,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]