diff options
Diffstat (limited to 'gtkmodule.c')
-rw-r--r-- | gtkmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtkmodule.c b/gtkmodule.c index 6da85774..a00c0769 100644 --- a/gtkmodule.c +++ b/gtkmodule.c @@ -5228,7 +5228,12 @@ _wrap_gtk_radio_button_group(PyObject *self, PyObject *args) return NULL; for (tmp = buttons; tmp != NULL; tmp = tmp->next) { PyObject *button = PyGtk_New(tmp->data); + if (!button) { + Py_DECREF(button); + return NULL; + } PyList_Append(ret, button); + Py_DECREF(button); } return ret; } |