Add warning when trying to use invalid LuaObject class
This commit is contained in:
parent
ce4f88b61d
commit
bca1af8f11
|
@ -1120,7 +1120,8 @@ void LuaInterface::pushObject(const LuaObjectPtr& obj)
|
||||||
m_totalObjRefs++;
|
m_totalObjRefs++;
|
||||||
|
|
||||||
obj->luaGetMetatable();
|
obj->luaGetMetatable();
|
||||||
assert(!isNil());
|
if(isNil())
|
||||||
|
g_logger.fatal(stdext::format("metatable for class '%s' not found, did you bind the C++ class?", obj->getClassName()));
|
||||||
setMetatable();
|
setMetatable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue