mirror of https://github.com/GNOME/gimp.git
return None if we're passed an ID of -1, like the other GIMP object
2007-05-24 Manish Singh <yosh@gimp.org> * plug-ins/pygimp/pygimp-display.c (pygimp_display_new): return None if we're passed an ID of -1, like the other GIMP object constructors. svn path=/trunk/; revision=22608
This commit is contained in:
parent
db08253213
commit
1c1ee4dd21
|
@ -1,3 +1,8 @@
|
|||
2007-05-24 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* plug-ins/pygimp/pygimp-display.c (pygimp_display_new): return None
|
||||
if we're passed an ID of -1, like the other GIMP object constructors.
|
||||
|
||||
2007-05-24 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* plug-ins/pygimp/pygimp-display.c: remove the delete method, PyGimp
|
||||
|
|
|
@ -46,6 +46,11 @@ pygimp_display_new(gint32 ID)
|
|||
{
|
||||
PyGimpDisplay *self;
|
||||
|
||||
if (ID == -1) {
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
self = PyObject_NEW(PyGimpDisplay, &PyGimpDisplay_Type);
|
||||
|
||||
if (self == NULL)
|
||||
|
|
Loading…
Reference in New Issue