1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 09:45:40 +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)