diff --git a/src/luaenginegui/luaengine/LuaEngineGui.cpp b/src/luaenginegui/luaengine/LuaEngineGui.cpp index b997137..2a3f53b 100644 --- a/src/luaenginegui/luaengine/LuaEngineGui.cpp +++ b/src/luaenginegui/luaengine/LuaEngineGui.cpp @@ -1188,8 +1188,8 @@ int LuaEngineGui::createToolButton(lua_State *L_p) int LuaEngineGui::createWidgetStack(lua_State *L_p) { - if (getArgumentCount(L_p) >= 2) { - void *pointer = getPointer(L_p, 2); + if (getArgumentCount(L_p) >= 1) { + void *pointer = getPointer(L_p, 1); if (pointer != NULL && ((QObject*)pointer)->inherits("QStackedWidget")) { QStackedWidget *stackedWidget = (QStackedWidget*)pointer; QWidget *widgetStack = new QWidget(stackedWidget);