diff options
Diffstat (limited to 'src/lua/lua_regexp.c')
-rw-r--r-- | src/lua/lua_regexp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c index 615062bf2..9bd387a4b 100644 --- a/src/lua/lua_regexp.c +++ b/src/lua/lua_regexp.c @@ -610,6 +610,12 @@ lua_regexp_split (lua_State *L) } else if (lua_type (L, 2) == LUA_TUSERDATA) { t = lua_check_text (L, 2); + + if (t == NULL) { + lua_error (L); + return 0; + } + data = t->start; len = t->len; is_text = TRUE; |