Fixed two crashers
authorPhilip Van Hoof <philip@codeminded.be>
Mon, 30 Jul 2007 08:52:45 +0000 (08:52 +0000)
committerPhilip Van Hoof <philip@codeminded.be>
Mon, 30 Jul 2007 08:52:45 +0000 (08:52 +0000)
pmo-sessionwork-r2841

src/maemo/modest-main-window.c
src/widgets/modest-folder-view.c

index f97cdbf..b6dae62 100644 (file)
@@ -1893,7 +1893,7 @@ on_configuration_key_changed (ModestConf* conf,
                              ModestConfNotificationId id, 
                              ModestMainWindow *self)
 {
-       ModestMainWindowPrivate *priv;
+       ModestMainWindowPrivate *priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
        TnyAccount *account;
 
        if (!key || 
@@ -1901,8 +1901,6 @@ on_configuration_key_changed (ModestConf* conf,
            strcmp (key, MODEST_CONF_DEVICE_NAME))
                return;
 
-       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
-
        if (priv->contents_style != MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS)
                return;
 
index 2c06336..8bc1576 100644 (file)
@@ -1943,13 +1943,14 @@ on_configuration_key_changed (ModestConf* conf,
 {
        ModestFolderViewPrivate *priv;
 
-       /* Do not listen for changes in other namespaces */
-       if (priv->notification_id != id)
-               return;
 
        g_return_if_fail (MODEST_IS_FOLDER_VIEW (self));
        priv = MODEST_FOLDER_VIEW_GET_PRIVATE(self);
 
+       /* Do not listen for changes in other namespaces */
+       if (priv->notification_id != id)
+                return;
+        
        if (!strcmp (key, MODEST_CONF_DEVICE_NAME)) {
                g_free (priv->local_account_name);