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. --- PC/winsound.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'PC/winsound.c') diff --git a/PC/winsound.c b/PC/winsound.c index b94b322068..81e3917ed6 100644 --- a/PC/winsound.c +++ b/PC/winsound.c @@ -220,6 +220,8 @@ initwinsound(void) PyObject *module = Py_InitModule3("winsound", sound_methods, sound_module_doc); + if (module == NULL) + return; PyObject *dict = PyModule_GetDict(module); ADD_DEFINE(SND_ASYNC); -- cgit v1.2.1