diff options
author | 2016-07-30 12:25:10 -0500 | |
---|---|---|
committer | 2016-07-30 12:25:10 -0500 | |
commit | 33245e7945cf76422e8931b93e0c3320fd8e9c6c (patch) | |
tree | 3bac724b3a2b0c341e08fe64e6f896e91ebce2ea | |
parent | 995794b80c60360289329bfa51b589a795b5f6d1 (diff) |
luaengine: (nw)
-rw-r--r-- | src/frontend/mame/luaengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index 52af1b85bef..4bad1bb39c8 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -2006,7 +2006,8 @@ void lua_engine::menu_populate(std::string &menu, std::vector<menu_item> &menu_l { if(lua_istable(m_lua_state, -1)) { - menu_item item; + menu_list.emplace_back(); + menu_item &item = menu_list.back(); lua_rawgeti(m_lua_state, -1, 1); item.text = lua_tostring(m_lua_state, -1); lua_pop(m_lua_state, 1); @@ -2016,7 +2017,6 @@ void lua_engine::menu_populate(std::string &menu, std::vector<menu_item> &menu_l lua_rawgeti(m_lua_state, -1, 3); item.flags = lua_tostring(m_lua_state, -1); lua_pop(m_lua_state, 1); - menu_list.push_back(item); } lua_pop(m_lua_state, 1); } |