diff options
Diffstat (limited to 'src/game/Object.h')
-rw-r--r-- | src/game/Object.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/Object.h b/src/game/Object.h index 9845ba10dce..efc5e8c18d2 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -518,7 +518,10 @@ class TRINITY_DLL_SPEC WorldObject : public Object, public WorldLocation bool IsInMap(const WorldObject* obj) const { - return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj); + if (obj) + return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj); + else + return false; } bool IsWithinDist3d(float x, float y, float z, float dist) const { return IsInDist(x, y, z, dist + GetObjectSize()); } |