* src/maemo/modest-platform.c:
authorJose Dapena Paz <jdapena@igalia.com>
Tue, 10 Jul 2007 07:06:00 +0000 (07:06 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Tue, 10 Jul 2007 07:06:00 +0000 (07:06 +0000)
        * Fixed a crash that happened on moving messages to outbox.
          The code to connect and wait, didn't consider the case of
          a message from a folder without an account (fixes NB#62872).

pmo-trunk-r2661

src/maemo/modest-platform.c

index 685d6fc..5812b27 100644 (file)
@@ -1047,8 +1047,10 @@ gboolean modest_platform_connect_and_wait_if_network_folderstore (GtkWindow *par
        if (TNY_IS_FOLDER (folder_store)) {
                /* Get the folder's parent account: */
                TnyAccount *account = tny_folder_get_account(TNY_FOLDER (folder_store));
-               result = modest_platform_connect_and_wait_if_network_account (NULL, account);
-               g_object_unref (account);
+               if (account != NULL) {
+                       result = modest_platform_connect_and_wait_if_network_account (NULL, account);
+                       g_object_unref (account);
+               }
        } else if (TNY_IS_ACCOUNT (folder_store)) {
                /* Use the folder store as an account: */
                result = modest_platform_connect_and_wait_if_network_account (NULL, TNY_ACCOUNT (folder_store));