mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-31 18:45:36 +00:00
Fix dereferencing a null pointer.
This commit is contained in:
parent
273ff1cccb
commit
8c39f2b376
1 changed files with 3 additions and 2 deletions
|
@ -1608,8 +1608,9 @@ CSMWorld::NpcStats* CSMWorld::Data::npcAutoCalculate(const ESM::NPC& npc) const
|
||||||
if (stats.get() == 0)
|
if (stats.get() == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
emit cacheNpcStats (npc.mId, stats.release());
|
CSMWorld::NpcStats *result = stats.release();
|
||||||
return stats.release();
|
emit cacheNpcStats (npc.mId, result);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMWorld::Data::cacheNpcStatsEvent (const std::string& id, CSMWorld::NpcStats *stats)
|
void CSMWorld::Data::cacheNpcStatsEvent (const std::string& id, CSMWorld::NpcStats *stats)
|
||||||
|
|
Loading…
Reference in a new issue