From f2623b5ee98875cd253793426e580f24d026f341 Mon Sep 17 00:00:00 2001 From: truelight Date: Tue, 10 Aug 2004 17:23:21 +0000 Subject: [PATCH] (svn r13) Fix #972087 - minimap crash --- smallmap_gui.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smallmap_gui.c b/smallmap_gui.c index 95bd826cf4..f5aa0551db 100644 --- a/smallmap_gui.c +++ b/smallmap_gui.c @@ -351,7 +351,8 @@ static void DrawSmallMapContours(byte *dst, uint xc, uint yc, int pitch, int rep { 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); }