# HG changeset patch # User truelight # Date 1092158601 0 # Node ID 689a3309cd1cfd8f4394696d1ee1935f901e7988 # Parent 836bc4b37b5bb04e13e0c9540d8fbd766abb69d2 (svn r13) Fix #972087 - minimap crash diff -r 836bc4b37b5b -r 689a3309cd1c smallmap_gui.c --- a/smallmap_gui.c Tue Aug 10 17:06:10 2004 +0000 +++ b/smallmap_gui.c Tue Aug 10 17:23:21 2004 +0000 @@ -351,7 +351,8 @@ { 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); }