* Fixes a memory read error when closing the windows due to delayed dimming rules...
authorSergio Villar Senin <svillar@igalia.com>
Tue, 15 Jul 2008 11:06:30 +0000 (11:06 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Tue, 15 Jul 2008 11:06:30 +0000 (11:06 +0000)
pmo-trunk-r5005

src/modest-ui-dimming-manager.c

index 36b90df..c256a2a 100644 (file)
@@ -222,6 +222,7 @@ process_dimming_rules_delayed_destroyer (gpointer data)
        priv = MODEST_UI_DIMMING_MANAGER_GET_PRIVATE(helper->manager);
        g_hash_table_remove (priv->delayed_calls, helper->name);
        g_free (helper->name);
        priv = MODEST_UI_DIMMING_MANAGER_GET_PRIVATE(helper->manager);
        g_hash_table_remove (priv->delayed_calls, helper->name);
        g_free (helper->name);
+       g_object_unref (helper->manager);
        g_slice_free (DelayedDimmingRules, helper);
 }
 
        g_slice_free (DelayedDimmingRules, helper);
 }
 
@@ -248,7 +249,7 @@ modest_ui_dimming_manager_process_dimming_rules_group (ModestUIDimmingManager *s
                /* Create the helper and start the timeout */
                helper = g_slice_new (DelayedDimmingRules);
                helper->group = group;
                /* Create the helper and start the timeout */
                helper = g_slice_new (DelayedDimmingRules);
                helper->group = group;
-               helper->manager = self;
+               helper->manager = g_object_ref (self);
                helper->name = g_strdup (group_name);
                new_handler = g_timeout_add_full (G_PRIORITY_DEFAULT, 500, process_dimming_rules_delayed, 
                                                  helper, process_dimming_rules_delayed_destroyer);
                helper->name = g_strdup (group_name);
                new_handler = g_timeout_add_full (G_PRIORITY_DEFAULT, 500, process_dimming_rules_delayed, 
                                                  helper, process_dimming_rules_delayed_destroyer);