From 5699bf9e659e5c8094b46a491d451bfc5342fc53 Mon Sep 17 00:00:00 2001 From: mniip Date: Mon, 4 Apr 2016 04:28:02 +0300 Subject: [PATCH] lua: Error if luaL_newstate returns NULL --- plugins/lua/lua.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/lua/lua.c b/plugins/lua/lua.c index 0c2ecb91..00bedbe5 100644 --- a/plugins/lua/lua.c +++ b/plugins/lua/lua.c @@ -1306,6 +1306,7 @@ static script_info *create_script(char const *file) info->state = L; if(!L) { + hexchat_print(ph, "\00304Could not allocate memory for the script"); g_free(info->filename); free(info); return NULL; @@ -1493,6 +1494,7 @@ static void create_interpreter(void) interp->state = L; if(!L) { + hexchat_print(ph, "\00304Could not allocate memory for the interpreter"); free(interp); interp = NULL; return;