Add warning when trying to use invalid LuaObject class

This commit is contained in:
Eduardo Bart 2012-07-31 06:44:19 -03:00
parent ce4f88b61d
commit bca1af8f11
1 changed files with 2 additions and 1 deletions

View File

@ -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();
} }