when trying the pygimp->sphere.py, I get an error message

PDB calling error for procedure 'gimp-context-set-foreground':
Argument 'foreground' (#1, type GimpRGB) out of bounds
(validation changed '<not transformable to string>'

I tracked this down to this: gimpmodule.c:
pygimp_set_foreground(PyObject *self, PyObject* args) {
GimpRGB colour;
gimp_rgb_set_uchar(&colour, r, g, b);

it looks like the "colour" is not correctly initialized
(the "a" member is not initialized)
adding a " gimp_context_get_background(&colour);"
before makes pygimp work again...

I wonder what the best way to fix this would be:

memset(&colour, 0, sizeof(colour));
colour->a = 0; // in gimp_rgb_set_uchar()

-- lode

Gimp-developer mailing list

Reply via email to