One of your posts helped me yesterday fix a crash, so i'm making you this present.
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 0f3c99b..1be6033 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -580,6 +580,10 @@ void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)
bool Map::loaded(const GridPair &p) const
{
+ // crash guard if x, y coordinates are outside grids
+ if ( (p.x_coord >= MAX_NUMBER_OF_GRIDS) || (p.y_coord >= MAX_NUMBER_OF_GRIDS) )
+ return false; // consider already loaded, skip
+
return ( getNGrid(p.x_coord, p.y_coord) && isGridObjectDataLoaded(p.x_coord, p.y_coord) );
}
I know it's not the proper way to fix it. But it should work.