summaryrefslogtreecommitdiff
path: root/src/core/wee-string.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-08-08 07:33:37 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-08-08 07:33:37 +0200
commit5597c93b640b9ce6eacd6f1363481389c03fc3bf (patch)
tree567c316ceb4bb2d3635b66677b314c39546570f6 /src/core/wee-string.c
parente7b604c97e1e7aa03e82b18b380228752820ee3e (diff)
downloadweechat-5597c93b640b9ce6eacd6f1363481389c03fc3bf.zip
core: check that regex is not NULL in function string_replace_regex
Diffstat (limited to 'src/core/wee-string.c')
-rw-r--r--src/core/wee-string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c
index 9e1965deb..488d332dc 100644
--- a/src/core/wee-string.c
+++ b/src/core/wee-string.c
@@ -1374,7 +1374,7 @@ string_replace_regex (const char *string, void *regex, const char *replace,
int length, length_replace, start_offset, i, rc, end, last_match;
regmatch_t regex_match[100];
- if (!string)
+ if (!string || !regex)
return NULL;
length = strlen (string) + 1;