mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Return nil for screen string index lookup instead of throwing error
This commit is contained in:
parent
4bd5b1940d
commit
20b1594e17
1 changed files with 3 additions and 1 deletions
|
@ -1040,7 +1040,9 @@ luaA_screen_module_index(lua_State *L)
|
|||
foreach(output, (*screen)->outputs)
|
||||
if(A_STREQ(output->name, name))
|
||||
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));
|
||||
|
|
Loading…
Reference in a new issue