Fixes NB#110084, fixes a hang when trying to retrieve message details while the messa...
[modest] / src / widgets / modest-window-mgr.c
index 97ac112..7182e7c 100644 (file)
@@ -475,15 +475,16 @@ modest_window_mgr_find_registered_header_default (ModestWindowMgr *self, TnyHead
 
        g_return_val_if_fail (MODEST_IS_WINDOW_MGR (self), FALSE);
        g_return_val_if_fail (TNY_IS_HEADER(header), FALSE);
-       
+
        priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
 
        uid = modest_tny_folder_get_header_unique_id (header);
-       
+
        if (win)
                *win = NULL;
 
        has_header = has_uid (priv->preregistered_uids, uid);
+       g_free (uid);
 
        return has_header;
 }
@@ -906,8 +907,11 @@ modest_window_mgr_show_initial_window (ModestWindowMgr *self)
 
                /* If there are no accounts then show the account wizard */
                mgr = modest_runtime_get_account_mgr();
-               if (!modest_account_mgr_has_accounts (mgr, TRUE))
-                       modest_ui_actions_run_account_setup_wizard (window);
+               if (!modest_account_mgr_has_accounts (mgr, TRUE)) {
+                       if (!modest_ui_actions_run_account_setup_wizard (window)) {
+                               g_debug ("%s: couldn't show account setup wizard", __FUNCTION__);
+                       }
+               }
        }
 
        return window;