* Fixed a bug when trying to launch modest without accounts
authorSergio Villar Senin <svillar@igalia.com>
Tue, 12 Jun 2007 14:14:54 +0000 (14:14 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Tue, 12 Jun 2007 14:14:54 +0000 (14:14 +0000)
pmo-trunk-r2181

src/modest-account-mgr-helpers.c

index 5872397..da7f1f1 100644 (file)
@@ -585,6 +585,10 @@ modest_account_mgr_set_first_account_as_default  (ModestAccountMgr *self)
 {
        gboolean result = FALSE;
        GSList *account_names = modest_account_mgr_account_names (self, TRUE /* only enabled */);
+
+       /* Return TRUE if there is no account */
+       if (!account_names)
+               return TRUE;
                
        /* Get the first one, alphabetically, by title: */
        GSList* list_sorted = g_slist_sort (account_names,