1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Fix segfault in /blocked with no args

Fix https://github.com/profanity-im/profanity/issues/1575
This commit is contained in:
Michael Vetter 2021-07-06 10:21:00 +02:00
parent 5022aeb337
commit 20e1f16b1f

View File

@ -3049,7 +3049,7 @@ cmd_blocked(ProfWin* window, const char* const command, gchar** args)
return TRUE; return TRUE;
} }
if (strncmp(args[0], "report-", 7) == 0) { if (args[0] && strncmp(args[0], "report-", 7) == 0) {
char* jid = NULL; char* jid = NULL;
char* msg = NULL; char* msg = NULL;
guint argn = g_strv_length(args); guint argn = g_strv_length(args);