# HG changeset patch # User truelight # Date 2004-08-10 17:23:21 # Node ID 429cee99824e7d8fec1ba37d262333c94dfe9423 # Parent c7045bf4c614d0a956bd81a3c9d4b0f5b8d3852d (svn r13) Fix #972087 - minimap crash diff --git a/smallmap_gui.c b/smallmap_gui.c --- a/smallmap_gui.c +++ b/smallmap_gui.c @@ -351,7 +351,8 @@ static void DrawSmallMapContours(byte *d { do { if (xc < TILE_X_MAX && yc < TILE_Y_MAX) - WRITE_PIXELS_OR( dst, GetSmallMapCountoursPixels(TILE_XY(xc,yc)) & mask ); + if (dst > _screen.dst_ptr && dst < (_screen.dst_ptr + _screen.width * _screen.height - _screen.width) ) + WRITE_PIXELS_OR( dst, GetSmallMapCountoursPixels(TILE_XY(xc,yc)) & mask ); } while (xc++,yc++,dst+=pitch,--reps != 0); }