aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2009-07-12 22:08:32 +0200
committerQAston <none@none>2009-07-12 22:08:32 +0200
commitf5eb5dba7cb6458b21952d4ba320225ff092ee1b (patch)
treee46e6c297dd3a0e5f4ea5bc7694669ab063e39b2 /src
parent060064f9dedf9a92c6978950bafe8e063b3c53b5 (diff)
*Add an Assert to trac where GO pointer is getting corrupted.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/GameObject.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 6e603346020..56c5bd7529e 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -928,10 +928,7 @@ void GameObject::SetOwnerGUID(uint64 owner)
// Owner already found and different than expected owner - remove object from old owner
if (owner && GetOwnerGUID() && GetOwnerGUID() != owner)
{
- if (Unit* owner = GetOwner())
- owner->RemoveGameObject(this, false);
- else
- assert(false);
+ assert(false);
}
m_spawnedByDefault = false; // all object with owner is despawned after delay
SetUInt64Value(OBJECT_FIELD_CREATED_BY, owner);