mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
Add warning when trying to use invalid LuaObject class
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user