diff --git a/CMakeLists.txt b/CMakeLists.txt index 5991c57c4c..c0d09542f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,7 +82,7 @@ message(STATUS "Configuring OpenMW...") set(OPENMW_VERSION_MAJOR 0) set(OPENMW_VERSION_MINOR 50) set(OPENMW_VERSION_RELEASE 0) -set(OPENMW_LUA_API_REVISION 88) +set(OPENMW_LUA_API_REVISION 89) set(OPENMW_POSTPROCESSING_API_REVISION 3) set(OPENMW_VERSION_COMMITHASH "") diff --git a/apps/openmw/mwlua/objectbindings.cpp b/apps/openmw/mwlua/objectbindings.cpp index 3508fdcd44..0a73acfc42 100644 --- a/apps/openmw/mwlua/objectbindings.cpp +++ b/apps/openmw/mwlua/objectbindings.cpp @@ -645,6 +645,9 @@ namespace MWLua } inventoryT["isResolved"] = [](const InventoryT& inventory) -> bool { const MWWorld::Ptr& ptr = inventory.mObj.ptr(); + // Avoid initializing custom data + if (!ptr.getRefData().getCustomData()) + return false; MWWorld::ContainerStore& store = ptr.getClass().getContainerStore(ptr); return store.isResolved(); };