about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-07-06 10:21:00 +0200
committerMichael Vetter <jubalh@iodoru.org>2021-07-06 10:21:26 +0200
commit20e1f16b1fdfeaa8c70a73c995059c8134e7f631 (patch)
tree3ddc6e9779711dd777c41c28476d5fb5a75f6a40 /src/command/cmd_funcs.c
parent5022aeb3370253d6b7067c04e2bb57d510077d31 (diff)
downloadprofani-tty-20e1f16b1fdfeaa8c70a73c995059c8134e7f631.tar.gz
Fix segfault in /blocked with no args
Fix https://github.com/profanity-im/profanity/issues/1575
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 88ab9712..96b541b8 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -3049,7 +3049,7 @@ cmd_blocked(ProfWin* window, const char* const command, gchar** args)
         return TRUE;
     }
 
-    if (strncmp(args[0], "report-", 7) == 0) {
+    if (args[0] && strncmp(args[0], "report-", 7) == 0) {
         char* jid = NULL;
         char* msg = NULL;
         guint argn = g_strv_length(args);