[app] Ensure calculated histogram spike height ...
is positive or zero. Sometimes the calculated `y` or `bg_y`
values are negative because the histogram value was divided
by zero (when max == 0.0).
Resolves: #9132 (Gnome/GIMP bug tracker)
(cherry picked from commit 9b517fbf7d
)
This commit is contained in:
@ -500,6 +500,9 @@ gimp_histogram_view_draw_spike (GimpHistogramView *view,
|
||||
break;
|
||||
}
|
||||
|
||||
y = MAX (y, 0);
|
||||
bg_y = MAX (bg_y, 0);
|
||||
|
||||
if (bg_color)
|
||||
{
|
||||
gdk_cairo_set_source_color (cr, bg_color);
|
||||
|
Reference in New Issue
Block a user