aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.h
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-31 02:14:25 -0700
committermaximius <none@none>2009-10-31 02:14:25 -0700
commit52bab5854fe8571f2c397af8ecafaadfea50a99e (patch)
tree5a56a6baeba67fdfa31b0fe013416505432a1658 /src/game/Object.h
parentca1e026c4f47487ed30f4b67fc1f152d84d9ee14 (diff)
*Fix a crash in Object.h
*Fix action button saving *Fix a crash on item swap in guild bank *Fix exploit moving after death in Unit.cpp *Fix assert fail at grid load in Creature.cpp Thanks Sisif for these! :) --HG-- branch : trunk
Diffstat (limited to 'src/game/Object.h')
-rw-r--r--src/game/Object.h5
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()); }