Select by Color segfault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you have a layer that is smaller than the image size and you
do a select-by-color using a point outside the layer's area, it
gives a segfault. The assertion in image_get_color_at is
wrong ... it's impossible to make it fail actually :-).
Here's the fix:

--- oops/app/gimpdrawable.c Mon Feb 21 10:23:45 2000
+++ gimp/app/gimpdrawable.c Mon Feb 28 18:06:57 2000
@@ -426,8 +426,8 @@
   g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
   g_return_val_if_fail (gimp_drawable_gimage (drawable), NULL);
   g_return_val_if_fail (!gimp_drawable_is_indexed (drawable), NULL);
-  g_return_val_if_fail (x >= 0 || x < drawable->width || 
-   y >= 0 || y < drawable->height, NULL);
+  g_return_val_if_fail (x >= 0 && x < drawable->width && 
+   y >= 0 && y < drawable->height, NULL);
 
   dest = g_new (guchar, 5);
 
Bye,
Paul



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux