Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 845f784 commit a956e64Copy full SHA for a956e64
1 file changed
Modules/_cursesmodule.c
@@ -2930,9 +2930,13 @@ PyCurses_Start_Color(PyObject *self)
2930
if (code != ERR) {
2931
initialisedcolors = TRUE;
2932
c = PyLong_FromLong((long) COLORS);
2933
+ if (c == NULL)
2934
+ return NULL;
2935
PyDict_SetItemString(ModDict, "COLORS", c);
2936
Py_DECREF(c);
2937
cp = PyLong_FromLong((long) COLOR_PAIRS);
2938
+ if (cp == NULL)
2939
2940
PyDict_SetItemString(ModDict, "COLOR_PAIRS", cp);
2941
Py_DECREF(cp);
2942
Py_INCREF(Py_None);
0 commit comments