1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 21:32:42 +00:00

Fix dereferencing a null pointer.

This commit is contained in:
cc9cii 2015-06-26 08:52:39 +10:00
parent 273ff1cccb
commit 8c39f2b376

View File

@ -1608,8 +1608,9 @@ CSMWorld::NpcStats* CSMWorld::Data::npcAutoCalculate(const ESM::NPC& npc) const
if (stats.get() == 0)
return 0;
emit cacheNpcStats (npc.mId, stats.release());
return stats.release();
CSMWorld::NpcStats *result = stats.release();
emit cacheNpcStats (npc.mId, result);
return result;
}
void CSMWorld::Data::cacheNpcStatsEvent (const std::string& id, CSMWorld::NpcStats *stats)