From 1ac754fa10f5d199d19911e21185d0970cb3073f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 19 Jan 2006 06:09:39 +0000 Subject: Check return result from Py_InitModule*(). This API can fail. Probably should be backported. --- Modules/_cursesmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/_cursesmodule.c') diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 176f024d29..4c03602d56 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -2481,6 +2481,8 @@ init_curses(void) /* Create the module and add the functions */ m = Py_InitModule("_curses", PyCurses_methods); + if (m == NULL) + return; /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); -- cgit v1.2.1