Fixes NB120950, crash in time_changed_cb()
authorSergio Villar Senin <svillar@igalia.com>
Fri, 5 Jun 2009 11:35:22 +0000 (13:35 +0200)
committerSergio Villar Senin <svillar@igalia.com>
Fri, 5 Jun 2009 11:35:22 +0000 (13:35 +0200)
The problem was that we weren't disconnecting time notifications in datetime formatters when they were finalized

src/modest-datetime-formatter.c

index 69665e0..1597be2 100644 (file)
@@ -228,6 +228,9 @@ modest_datetime_formatter_finalize   (GObject *obj)
        priv->gconf_handler = 0;
        gconf_client_remove_dir (gconf, HILDON2_GCONF_FORMAT_DIR,
                                 NULL);
        priv->gconf_handler = 0;
        gconf_client_remove_dir (gconf, HILDON2_GCONF_FORMAT_DIR,
                                 NULL);
+
+       /* Disconnect notification */
+       osso_time_set_notification_cb (modest_platform_get_osso_context (), NULL, NULL);
 #endif
        G_OBJECT_CLASS (parent_class)->finalize (obj);
 }
 #endif
        G_OBJECT_CLASS (parent_class)->finalize (obj);
 }