mirror of https://github.com/GNOME/gimp.git
Initialise self->drawable in lay_init and chn_init
2008-07-24 Lars-Peter Clausen <lars@metafoo.de> * plug-ins/pygimp/pygimp-drawable.c: Initialise self->drawable in lay_init and chn_init svn path=/branches/soc-2008-python/; revision=26296
This commit is contained in:
parent
ee727921bb
commit
8b1b5015ea
|
@ -1,3 +1,8 @@
|
|||
2008-07-24 Lars-Peter Clausen <lars@metafoo.de>
|
||||
|
||||
* plug-ins/pygimp/pygimp-drawable.c: Initialise self->drawable in lay_init
|
||||
and chn_init
|
||||
|
||||
2008-07-23 Lars-Peter Clausen <lars@metafoo.de>
|
||||
|
||||
* plug-ins/pygimp/gimpui.override: Wrapped GimpAspectpreview,
|
||||
|
|
|
@ -1714,7 +1714,6 @@ lay_init(PyGimpLayer *self, PyObject *args, PyObject *kwargs)
|
|||
self->ID = gimp_layer_new(img->ID, name, width, height,
|
||||
type, opacity, mode);
|
||||
|
||||
self->drawable = NULL;
|
||||
|
||||
if (self->ID < 0) {
|
||||
PyErr_Format(pygimp_error,
|
||||
|
@ -1724,6 +1723,8 @@ lay_init(PyGimpLayer *self, PyObject *args, PyObject *kwargs)
|
|||
return -1;
|
||||
}
|
||||
|
||||
self->drawable = gimp_drawable_get(self->ID);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2004,8 +2005,6 @@ chn_init(PyGimpChannel *self, PyObject *args, PyObject *kwargs)
|
|||
|
||||
self->ID = gimp_channel_new(img->ID, name, width, height, opacity, rgb);
|
||||
|
||||
self->drawable = NULL;
|
||||
|
||||
if (self->ID < 0) {
|
||||
PyErr_Format(pygimp_error,
|
||||
"could not create %dx%d channel '%s' on image (ID %d)",
|
||||
|
@ -2013,6 +2012,8 @@ chn_init(PyGimpChannel *self, PyObject *args, PyObject *kwargs)
|
|||
return -1;
|
||||
}
|
||||
|
||||
self->drawable = gimp_drawable_get(self->ID);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue