mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
src/gui/lua/lua_cc_text.cpp avoid segfault
This commit is contained in:
@@ -208,10 +208,11 @@ int CLuaInstCCText::CCTextSetText(lua_State *L)
|
||||
std::string text = "";
|
||||
lua_Integer mode = D->mode;
|
||||
lua_Integer font_text = D->font_text;
|
||||
tableLookup(L, "text", text);
|
||||
tableLookup(L, "mode", mode);
|
||||
tableLookup(L, "font_text", font_text);
|
||||
|
||||
if (lua_istable(L, -1)){
|
||||
tableLookup(L, "text", text);
|
||||
tableLookup(L, "mode", mode);
|
||||
tableLookup(L, "font_text", font_text);
|
||||
}
|
||||
D->ct->setText(text, mode, g_Font[font_text]);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user