mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 21:40:03 +00:00
Merge pull request #3012 from akortunov/container_crash
Fix crash on saving
This commit is contained in:
commit
425fa837d1
@ -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…
x
Reference in New Issue
Block a user