aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectGridLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/ObjectGridLoader.cpp')
-rw-r--r--src/game/ObjectGridLoader.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/game/ObjectGridLoader.cpp b/src/game/ObjectGridLoader.cpp
index d14389725b3..d69499d8014 100644
--- a/src/game/ObjectGridLoader.cpp
+++ b/src/game/ObjectGridLoader.cpp
@@ -52,11 +52,10 @@ ObjectGridRespawnMover::Visit(CreatureMapType &m)
// creature in unloading grid can have respawn point in another grid
// if it will be unloaded then it will not respawn in original grid until unload/load original grid
// move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn.
- for(CreatureMapType::iterator iter=m.begin(), next; iter != m.end(); iter = next)
+ for(CreatureMapType::iterator iter = m.begin(); iter != m.end();)
{
- next = iter; ++next;
-
Creature * c = iter->getSource();
+ ++iter;
assert(!c->isPet() && "ObjectGridRespawnMover don't must be called for pets");