diff options
| author | megamage <none@none> | 2009-03-03 16:18:22 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-03 16:18:22 -0600 |
| commit | c113bf884f9523745f22aae78cde80903b2ba192 (patch) | |
| tree | a14135ce66c9b514a318c9f90a89034c3a1eade4 /src/game/ObjectAccessor.cpp | |
| parent | 0a78760b758235ba2c48fc6b48514403ed052730 (diff) | |
factionTemplate->faction can be 0, add appropriate checks to prevent crashes and unexpected work. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectAccessor.cpp')
| -rw-r--r-- | src/game/ObjectAccessor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index e832aec0c57..af365f51517 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -86,7 +86,7 @@ ObjectAccessor::GetNPCIfCanInteractWith(Player const &player, uint64 guid, uint3 if(factionTemplate) { FactionEntry const* faction = sFactionStore.LookupEntry(factionTemplate->faction); - if( faction->reputationListID >= 0 && player.GetReputationRank(faction) <= REP_UNFRIENDLY) + if( faction && faction->reputationListID >= 0 && player.GetReputationRank(faction) <= REP_UNFRIENDLY) return NULL; } |
