Skip to content

Commit

Permalink
Fixed a server crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemongrass3110 committed Jan 9, 2019
1 parent 8ae788b commit 7eed88c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/map/map.cpp
Expand Up @@ -744,6 +744,11 @@ int map_foreachinareaV(int(*func)(struct block_list*, va_list), int16 m, int16 x


struct map_data *mapdata = map_getmapdata(m); struct map_data *mapdata = map_getmapdata(m);


// Required for delayed monster removal in instances
if( mapdata == nullptr || mapdata->block == nullptr ){
return 0;
}

x0 = i16max(x0, 0); x0 = i16max(x0, 0);
y0 = i16max(y0, 0); y0 = i16max(y0, 0);
x1 = i16min(x1, mapdata->xs - 1); x1 = i16min(x1, mapdata->xs - 1);
Expand Down

0 comments on commit 7eed88c

Please sign in to comment.