app, pdb: fix bug in recent gimp-drawable-threshold change

Actually use the passed ranges again, instead of using uninitialized
local variables.
This commit is contained in:
Michael Natterer 2016-11-07 20:27:36 +01:00
parent 5e2a61850e
commit c767179ced
2 changed files with 4 additions and 4 deletions

View File

@ -410,8 +410,8 @@ drawable_histogram_invoker (GimpProcedure *procedure,
n_bins = gimp_histogram_n_bins (histogram);
start = ROUND ((gdouble) start * (n_bins - 1));
end = ROUND ((gdouble) end * (n_bins - 1));
start = ROUND (start_range * (n_bins - 1));
end = ROUND (end_range * (n_bins - 1));
mean = gimp_histogram_get_mean (histogram, channel,
start, end);

View File

@ -456,8 +456,8 @@ HELP
n_bins = gimp_histogram_n_bins (histogram);
start = ROUND ((gdouble) start * (n_bins - 1));
end = ROUND ((gdouble) end * (n_bins - 1));
start = ROUND (start_range * (n_bins - 1));
end = ROUND (end_range * (n_bins - 1));
mean = gimp_histogram_get_mean (histogram, channel,
start, end);