diff --git a/ChangeLog b/ChangeLog index feee0dfc11..d934b9bee0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Apr 8 21:19:05 BST 1999 Andy Thomas + + Changed:- + + * app/image_map.c + + Fixed boundary problem in new function image_map_get_color_at(). + Thu Apr 8 07:12:10 MEST 1999 Sven Neumann * app/crop.[ch]: Ok, this is a little bit more than what we diff --git a/app/core/gimpimagemap.c b/app/core/gimpimagemap.c index 8ea57c34f7..7c68bf745d 100644 --- a/app/core/gimpimagemap.c +++ b/app/core/gimpimagemap.c @@ -320,8 +320,10 @@ image_map_get_color_at (ImageMap image_map, int x, int y) if (!image_map || (!gimp_drawable_gimage(_image_map->drawable) && - gimp_drawable_indexed(_image_map->drawable)) - || x < 0 || y < 0 ) + gimp_drawable_indexed(_image_map->drawable)) || + x < 0 || y < 0 || + x >= _image_map->undo_tiles->width || + y >= _image_map->undo_tiles->height) { return NULL; } diff --git a/app/image_map.c b/app/image_map.c index 8ea57c34f7..7c68bf745d 100644 --- a/app/image_map.c +++ b/app/image_map.c @@ -320,8 +320,10 @@ image_map_get_color_at (ImageMap image_map, int x, int y) if (!image_map || (!gimp_drawable_gimage(_image_map->drawable) && - gimp_drawable_indexed(_image_map->drawable)) - || x < 0 || y < 0 ) + gimp_drawable_indexed(_image_map->drawable)) || + x < 0 || y < 0 || + x >= _image_map->undo_tiles->width || + y >= _image_map->undo_tiles->height) { return NULL; }