mirror of
https://github.com/hexchat/hexchat.git
synced 2024-11-05 18:52:39 +01:00
lua: Error if luaL_newstate returns NULL
This commit is contained in:
parent
c4c1c64f00
commit
5699bf9e65
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user