mirror of https://github.com/GNOME/gimp.git
avoids function call with an invalid drawable id
2007-08-15 Joao S. O. Bueno Calligaris <gwidion@mpc.com.br> * plug-ins/pygimp/pygimp-drawable.c: avoids function call with an invalid drawable id svn path=/trunk/; revision=23272
This commit is contained in:
parent
4a6b4bc067
commit
ea9a919220
|
@ -1,3 +1,8 @@
|
||||||
|
2007-08-15 Joao S. O. Bueno Calligaris <gwidion@mpc.com.br>
|
||||||
|
|
||||||
|
* plug-ins/pygimp/pygimp-drawable.c: avoids function call
|
||||||
|
with an invalid drawable id
|
||||||
|
|
||||||
2007-08-15 Sven Neumann <sven@gimp.org>
|
2007-08-15 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/print/print-page-layout.c: applied patch from Stefan
|
* plug-ins/print/print-page-layout.c: applied patch from Stefan
|
||||||
|
|
|
@ -1211,7 +1211,12 @@ pygimp_drawable_new(GimpDrawable *drawable, gint32 ID)
|
||||||
ID = drawable->drawable_id;
|
ID = drawable->drawable_id;
|
||||||
|
|
||||||
/* create the appropriate object type */
|
/* create the appropriate object type */
|
||||||
if (gimp_drawable_is_layer(ID))
|
|
||||||
|
/* avoids calling gimp_drawable_is_layer with an invalid id
|
||||||
|
* pygimp_channel_new handles it cleanly
|
||||||
|
*/
|
||||||
|
if (gimp_drawable_is_valid(ID) &&
|
||||||
|
gimp_drawable_is_layer(ID))
|
||||||
self = pygimp_layer_new(ID);
|
self = pygimp_layer_new(ID);
|
||||||
else
|
else
|
||||||
self = pygimp_channel_new(ID);
|
self = pygimp_channel_new(ID);
|
||||||
|
|
Loading…
Reference in New Issue