mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-05 23:51:39 +00:00
[Client] Fix crash when creating Cell from base Cell lacking Pathgrid
This commit is contained in:
parent
43f531e9a5
commit
3af57f0858
1 changed files with 7 additions and 3 deletions
|
@ -373,9 +373,13 @@ void RecordHelper::overrideRecord(const mwmp::CellRecord& record)
|
||||||
// Note: This has to be done after the new Cell has been created so the Pathgrid override
|
// Note: This has to be done after the new Cell has been created so the Pathgrid override
|
||||||
// can correctly determine whether the Cell is an interior or an exterior
|
// can correctly determine whether the Cell is an interior or an exterior
|
||||||
const ESM::Pathgrid* basePathgrid = world->getStore().get<ESM::Pathgrid>().search(record.baseId);
|
const ESM::Pathgrid* basePathgrid = world->getStore().get<ESM::Pathgrid>().search(record.baseId);
|
||||||
ESM::Pathgrid finalPathgrid = *basePathgrid;
|
|
||||||
finalPathgrid.mCell = recordData.mName;
|
if (basePathgrid)
|
||||||
world->getModifiableStore().overrideRecord(finalPathgrid);
|
{
|
||||||
|
ESM::Pathgrid finalPathgrid = *basePathgrid;
|
||||||
|
finalPathgrid.mCell = recordData.mName;
|
||||||
|
world->getModifiableStore().overrideRecord(finalPathgrid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue