summaryrefslogtreecommitdiff
path: root/src/core/hook
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-08-04 13:30:53 +0200
committerSébastien Helleu <flashcode@flashtux.org>2019-08-04 13:30:53 +0200
commitfbc022a77a53db568f7764ea65d8014127e5c107 (patch)
tree88e1b8b9e7f76d147701b20813bc443be1da669e /src/core/hook
parentc46255b1d0d9615cf4cc54b708fbe4a15ae1151a (diff)
downloadweechat-fbc022a77a53db568f7764ea65d8014127e5c107.zip
core: return NULL immediately if string is NULL in function hook_modifier_exec
Diffstat (limited to 'src/core/hook')
-rw-r--r--src/core/hook/wee-hook-modifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hook/wee-hook-modifier.c b/src/core/hook/wee-hook-modifier.c
index e9cb30904..af1cad1cd 100644
--- a/src/core/hook/wee-hook-modifier.c
+++ b/src/core/hook/wee-hook-modifier.c
@@ -92,7 +92,7 @@ hook_modifier_exec (struct t_weechat_plugin *plugin, const char *modifier,
/* make C compiler happy */
(void) plugin;
- if (!modifier || !modifier[0])
+ if (!modifier || !modifier[0] || !string)
return NULL;
new_msg = NULL;