diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-string.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 13168b312..5becd6409 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -854,10 +854,13 @@ string_regex_flags (const char *regex, int default_flags, int *flags) int set_flag, flag; char *pos; - ptr_regex = regex; if (flags) *flags = default_flags; + if (!regex) + return NULL; + + ptr_regex = regex; while (strncmp (ptr_regex, "(?", 2) == 0) { pos = strchr (ptr_regex, ')'); |