From dedc3a44aea9ffa8eb98965eb7296910a278a0f4 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 14 Jan 2010 18:32:00 +0100 Subject: [PATCH] issue 3299: replace PyObject_DEL() by Py_DECREF() in _curses_panel module --- Modules/_curses_panel.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c index 6831473..d09204e 100644 --- a/Modules/_curses_panel.c +++ b/Modules/_curses_panel.c @@ -105,6 +105,9 @@ remove_lop(PyCursesPanelObject *po) { list_of_panels *temp, *n; + if (lop == NULL) + return; + temp = lop; if (temp->po == po) { lop = temp->next; @@ -181,7 +184,7 @@ PyCursesPanel_New(PANEL *pan, PyCursesWindowObject *wo) po->wo = wo; Py_INCREF(wo); if (insert_lop(po) < 0) { - PyObject_DEL(po); + Py_DECREF(po); return NULL; } return (PyObject *)po; -- 1.6.6