aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-12 13:03:44 -0500
committermegamage <none@none>2009-08-12 13:03:44 -0500
commita30e3b7bd3483bc19be6ab4eebe94d9d79c382f6 (patch)
treeadf119f72f53df3db721e3545a197e703cb045c0
parentbee1dff87f0b3ab7acd3f0fb511354e5cc8850fd (diff)
*Fix a crash caused by addnpc command.
--HG-- branch : trunk
-rw-r--r--src/game/Object.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index d8903409d48..87922808179 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -1705,6 +1705,9 @@ void WorldObject::SetMap(Map * map)
{
ASSERT(map);
ASSERT(!IsInWorld() || GetTypeId() == TYPEID_CORPSE);
+ if(m_currMap == map) // command add npc: first create, than loadfromdb
+ return;
+
ASSERT(!m_currMap);
m_currMap = map;
if(m_isWorldObject)