mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-09 21:44:54 +00:00
Fix crash on saving
This commit is contained in:
parent
72549651e0
commit
8e647aa72a
@ -308,8 +308,14 @@ namespace MWClass
|
|||||||
|
|
||||||
void Container::writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) const
|
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();
|
const ContainerCustomData& customData = ptr.getRefData().getCustomData()->asContainerCustomData();
|
||||||
if (!ptr.getRefData().getCustomData() || !customData.mStore.isResolved())
|
if (!customData.mStore.isResolved())
|
||||||
{
|
{
|
||||||
state.mHasCustomState = false;
|
state.mHasCustomState = false;
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user