mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-31 22:45:35 +00:00
Merge pull request #3012 from akortunov/container_crash
Fix crash on saving
This commit is contained in:
commit
425fa837d1
1 changed files with 7 additions and 1 deletions
|
@ -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…
Reference in a new issue