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:
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)
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue