diff --git a/ChangeLog b/ChangeLog index 4aedda7d9b..819dea148a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ 2008-02-06 Michael Natterer - * app/gegl/gimpoperationhuesaturation.c - (gimp_operation_hue_saturation_process): don't crash if there is - no config object. + * app/gegl/gimpoperationposterize.c + * app/gegl/gimpoperationhuesaturation.c (process): don't crash if + there is no config object. 2008-02-06 Michael Natterer diff --git a/app/gegl/gimpoperationposterize.c b/app/gegl/gimpoperationposterize.c index f978e40901..bf15dfee08 100644 --- a/app/gegl/gimpoperationposterize.c +++ b/app/gegl/gimpoperationposterize.c @@ -83,11 +83,13 @@ gimp_operation_posterize_process (GeglOperation *operation, GimpPosterizeConfig *config = GIMP_POSTERIZE_CONFIG (point->config); gfloat *src = in_buf; gfloat *dest = out_buf; - gfloat levels = config->levels - 1.0; + gfloat levels; if (! config) return FALSE; + levels = config->levels - 1.0; + while (samples--) { dest[RED_PIX] = RINT (src[RED_PIX] * levels) / levels;