-
-
- /* g_debug ("DEBUG: %s: Searching account %s",
- __FUNCTION__, tny_account_get_name (account)); */
- res = modest_search_account (account, search);
+ if (account) {
+ /* g_debug ("DEBUG: %s: Searching account %s",
+ __FUNCTION__, tny_account_get_name (account)); */
+
+ /* Give the account time to go online if necessary,
+ * for instance if this is immediately after startup,
+ * after D-Bus activation: */
+ modest_platform_check_and_wait_for_account_is_online (account);