on open connections when there aren't any (diagnosed by Nico Golde).
Closes: #2079.
}
}
- for (conn = mutt_socket_head (); conn->next; conn = conn->next)
+ for (conn = mutt_socket_head (); conn && conn->next; conn = conn->next)
{
ciss_url_t url;
char urlstr[LONG_STRING];
url_parse_ciss (&url, c);
if (url.scheme == U_IMAP || url.scheme == U_IMAPS)
{
- if (mutt_account_fromurl (&mx->account, &url) < 0)
+ if (mutt_account_fromurl (&mx->account, &url) < 0 || !*mx->account.host)
{
FREE (&c);
return -1;
}
}
}
-
+
if ((mx->account.flags & M_ACCT_SSL) && !(mx->account.flags & M_ACCT_PORT))
mx->account.port = ImapsPort;