mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-17 19:20:20 +00:00
lua: Error if luaL_newstate returns NULL
This commit is contained in:
@@ -1306,6 +1306,7 @@ static script_info *create_script(char const *file)
|
|||||||
info->state = L;
|
info->state = L;
|
||||||
if(!L)
|
if(!L)
|
||||||
{
|
{
|
||||||
|
hexchat_print(ph, "\00304Could not allocate memory for the script");
|
||||||
g_free(info->filename);
|
g_free(info->filename);
|
||||||
free(info);
|
free(info);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1493,6 +1494,7 @@ static void create_interpreter(void)
|
|||||||
interp->state = L;
|
interp->state = L;
|
||||||
if(!L)
|
if(!L)
|
||||||
{
|
{
|
||||||
|
hexchat_print(ph, "\00304Could not allocate memory for the interpreter");
|
||||||
free(interp);
|
free(interp);
|
||||||
interp = NULL;
|
interp = NULL;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user