diff --git a/libmattermost.c b/libmattermost.c index 2546f8b..04b1a0f 100644 --- a/libmattermost.c +++ b/libmattermost.c @@ -2745,6 +2745,9 @@ mm_login(PurpleAccount *account) PurpleConnectionFlags pc_flags; const gchar *split_string = (char[2]) {MATTERMOST_SERVER_SPLIT_CHAR, '\0'}; + if (!pc) + return; + pc_flags = purple_connection_get_flags(pc); pc_flags |= PURPLE_CONNECTION_FLAG_HTML; pc_flags |= PURPLE_CONNECTION_FLAG_NO_FONTSIZE;