diff --git a/src/zm_regexp.cpp b/src/zm_regexp.cpp index d1bca34a5..90c000028 100644 --- a/src/zm_regexp.cpp +++ b/src/zm_regexp.cpp @@ -49,7 +49,10 @@ RegExpr::RegExpr( const char *pattern, int flags, int p_max_matches ) : max_matc memset( match_lengths, 0, sizeof(*match_lengths)*max_matches ); match_valid = new bool[max_matches]; memset( match_valid, 0, sizeof(*match_valid)*max_matches ); + } else { + match_vectors = NULL; } + match_string = ""; n_matches = 0; }