From: Philip Van Hoof Date: Mon, 30 Jul 2007 08:52:45 +0000 (+0000) Subject: Fixed two crashers X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=26ec2121091b0902a2952fa86a0f8244d5c59d04;p=modest Fixed two crashers pmo-sessionwork-r2841 --- diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index f97cdbf..b6dae62 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -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; diff --git a/src/widgets/modest-folder-view.c b/src/widgets/modest-folder-view.c index 2c06336..8bc1576 100644 --- a/src/widgets/modest-folder-view.c +++ b/src/widgets/modest-folder-view.c @@ -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);