Fix crash on saving

pull/593/head
Andrei Kortunov 4 years ago
parent 72549651e0
commit 8e647aa72a

@ -308,8 +308,14 @@ namespace MWClass
void Container::writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) const
{
if (!ptr.getRefData().getCustomData())
{
state.mHasCustomState = false;
return;
}
const ContainerCustomData& customData = ptr.getRefData().getCustomData()->asContainerCustomData();
if (!ptr.getRefData().getCustomData() || !customData.mStore.isResolved())
if (!customData.mStore.isResolved())
{
state.mHasCustomState = false;
return;

Loading…
Cancel
Save