* fix for crash when no accounts are specified
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Sun, 22 Apr 2007 07:34:47 +0000 (07:34 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Sun, 22 Apr 2007 07:34:47 +0000 (07:34 +0000)
pmo-trunk-r1629

src/maemo/modest-main-window.c

index b797d40..3e85f7c 100644 (file)
@@ -894,7 +894,10 @@ on_configuration_key_changed (ModestConf* conf,
                return;
 
        account = TNY_ACCOUNT (modest_folder_view_get_selected (priv->folder_view));
-       if (!strcmp (tny_account_get_id (account), MODEST_LOCAL_FOLDERS_ACCOUNT_ID)) {
-               /* TODO: change device name */
-       }
+       if (account) 
+               if (account &&
+                   strcmp (tny_account_get_id (account), MODEST_LOCAL_FOLDERS_ACCOUNT_ID) == 0) {
+                       /* TODO: change device name */
+               }
+       
 }