Return nil for screen string index lookup instead of throwing error
This commit is contained in:
parent
4bd5b1940d
commit
20b1594e17
|
@ -1040,7 +1040,9 @@ luaA_screen_module_index(lua_State *L)
|
||||||
foreach(output, (*screen)->outputs)
|
foreach(output, (*screen)->outputs)
|
||||||
if(A_STREQ(output->name, name))
|
if(A_STREQ(output->name, name))
|
||||||
return luaA_object_push(L, *screen);
|
return luaA_object_push(L, *screen);
|
||||||
luaL_error(L, "Unknown screen output name: %s", name);
|
luaA_warn(L, "Unknown screen output name: %s", name);
|
||||||
|
lua_pushnil(L);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return luaA_object_push(L, luaA_checkscreen(L, 2));
|
return luaA_object_push(L, luaA_checkscreen(L, 2));
|
||||||
|
|
Loading…
Reference in New Issue