mirror of https://github.com/GNOME/gimp.git
app/gegl/gimpoperationposterize.c don't crash if there is no config
2008-02-06 Michael Natterer <mitch@gimp.org> * app/gegl/gimpoperationposterize.c * app/gegl/gimpoperationhuesaturation.c (process): don't crash if there is no config object. svn path=/trunk/; revision=24821
This commit is contained in:
parent
a86a237fdc
commit
ce99c14bae
|
@ -1,8 +1,8 @@
|
|||
2008-02-06 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* 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 <mitch@gimp.org>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue