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:

committed by
Manish Singh

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>
|
2007-05-24 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* plug-ins/pygimp/pygimp-display.c: remove the delete method, PyGimp
|
* plug-ins/pygimp/pygimp-display.c: remove the delete method, PyGimp
|
||||||
|
@ -46,6 +46,11 @@ pygimp_display_new(gint32 ID)
|
|||||||
{
|
{
|
||||||
PyGimpDisplay *self;
|
PyGimpDisplay *self;
|
||||||
|
|
||||||
|
if (ID == -1) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return Py_None;
|
||||||
|
}
|
||||||
|
|
||||||
self = PyObject_NEW(PyGimpDisplay, &PyGimpDisplay_Type);
|
self = PyObject_NEW(PyGimpDisplay, &PyGimpDisplay_Type);
|
||||||
|
|
||||||
if (self == NULL)
|
if (self == NULL)
|
||||||
|
Reference in New Issue
Block a user