Fix visibility settings for GuiPropertyComponent in Debug builds

Fix Lua state leaking when setting delta time
This commit is contained in:
Alexander Bock
2018-03-16 10:41:45 -04:00
parent db7ae7e384
commit 32632f2df0
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ protected:
void renderPropertyOwner(properties::PropertyOwner* owner);
void renderProperty(properties::Property* prop, properties::PropertyOwner* owner);
properties::Property::Visibility _visibility;
properties::Property::Visibility _visibility = properties::Property::Visibility::User;
SourceFunction _function;
/// This is set to \c true if all properties contained in this GUIPropertyComponent
+2
View File
@@ -45,6 +45,8 @@ int time_setDeltaTime(lua_State* L) {
const bool isNumber = (lua_isnumber(L, -1) != 0);
if (isNumber) {
double value = lua_tonumber(L, -1);
lua_pop(L, 1);
OsEng.timeManager().time().setDeltaTime(value);
ghoul_assert(lua_gettop(L) == 0, "Incorrect number of items left on stack");
return 0;