-
- /* g_debug ("DEBUG: %s: Searching account %s",
- __FUNCTION__, tny_account_get_name (account)); */
- res = modest_search_account (account, search);
-
- if (res != NULL) {
-
- if (hits == NULL) {
- hits = res;
- } else {
- hits = g_list_concat (hits, res);
+ if (account) {
+ /* g_debug ("DEBUG: %s: Searching account %s",
+ __FUNCTION__, tny_account_get_name (account)); */
+ res = modest_search_account (account, search);
+
+ if (res != NULL) {
+ if (hits == NULL) {
+ hits = res;
+ } else {
+ hits = g_list_concat (hits, res);
+ }