diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_cursesmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 5d14898..27e5579 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -2926,9 +2926,13 @@ PyCurses_Start_Color(PyObject *self) if (code != ERR) { initialisedcolors = TRUE; c = PyLong_FromLong((long) COLORS); + if (c == NULL) + return NULL; PyDict_SetItemString(ModDict, "COLORS", c); Py_DECREF(c); cp = PyLong_FromLong((long) COLOR_PAIRS); + if (cp == NULL) + return NULL; PyDict_SetItemString(ModDict, "COLOR_PAIRS", cp); Py_DECREF(cp); Py_INCREF(Py_None); |