* Fixes NB#100159, added a missing NULL check to fix a crash
authorSergio Villar Senin <svillar@igalia.com>
Mon, 2 Feb 2009 16:04:06 +0000 (16:04 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 2 Feb 2009 16:04:06 +0000 (16:04 +0000)
pmo-trunk-r7363

src/modest-ui-actions.c

index 8b387a8..df8fd8b 100644 (file)
@@ -5896,10 +5896,12 @@ do_headers_action (ModestWindow *win,
 
        /* Trick: do a poke status in order to speed up the signaling
           of observers */
-       tny_folder_poke_status (folder);
+       if (folder) {
+               tny_folder_poke_status (folder);
+               g_object_unref (folder);
+       }
 
        /* Frees */
-       g_object_unref (folder);
        g_object_unref (iter);
        g_object_unref (headers_list);
 }