Ensure that the python drawables gimp drawable is set. (pf_dealloc): Don't

2008-08-26  Lars-Peter Clausen  <lars@metafoo.de>

	* plug-ins/pygimp/pygimp-tile.c
	(pf_init): Ensure that the python drawables gimp drawable is set.
	(pf_dealloc): Don't crash if the pixel fetchers init function failed.


svn path=/trunk/; revision=26784
This commit is contained in:
Lars-Peter Clausen 2008-08-26 21:59:21 +00:00 committed by Lars-Peter Clausen
parent 6e764915d5
commit 4d4ef1a8cf
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-08-26 Lars-Peter Clausen <lars@metafoo.de>
* plug-ins/pygimp/pygimp-tile.c
(pf_init): Ensure that the python drawables gimp drawable is set.
(pf_dealloc): Don't crash if the pixel fetchers init function failed.
2008-08-26 Sven Neumann <sven@gimp.org>
* app/base/pixel-surround.c: updated documentation.

View File

@ -902,7 +902,8 @@ pf_dealloc(PyGimpPixelFetcher *self)
{
gimp_pixel_fetcher_destroy(self->pf);
Py_DECREF(self->drawable);
Py_XDECREF(self->drawable);
PyObject_DEL(self);
}
@ -942,6 +943,9 @@ pf_init(PyGimpPixelFetcher *self, PyObject *args, PyObject *kwargs)
&edge_mode))
return -1;
if(!drw->drawable)
drw->drawable = gimp_drawable_get(drw->ID);
self->pf = gimp_pixel_fetcher_new(drw->drawable, shadow);
Py_INCREF(drw);