* check if current_folder != NULL;
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 8 Jan 2008 18:11:19 +0000 (18:11 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 8 Jan 2008 18:11:19 +0000 (18:11 +0000)
  this caused a Glib-Critical when folder moving failed

pmo-trunk-r3995

src/modest-ui-actions.c

index 858716e..17633f1 100644 (file)
@@ -2049,8 +2049,8 @@ folder_refreshed_cb (ModestMailOperation *mail_op,
                if (current_folder != NULL && folder != current_folder) {
                        g_object_unref (current_folder);
                        return;
-               }
-               g_object_unref (current_folder);
+               } else if (current_folder)
+                       g_object_unref (current_folder);
        }
 
        /* Check if folder is empty and set headers view contents style */