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:
Manish Singh 2007-05-25 01:28:31 +00:00 committed by Manish Singh
parent db08253213
commit 1c1ee4dd21
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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)