mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Check NULL if Py_InitModule fails.
This commit is contained in:
parent
82f6cc4728
commit
32feb8592f
1 changed files with 2 additions and 1 deletions
|
@ -388,6 +388,7 @@ errorexit:
|
||||||
init_codecs_##loc(void) \
|
init_codecs_##loc(void) \
|
||||||
{ \
|
{ \
|
||||||
PyObject *m = Py_InitModule("_codecs_" #loc, __methods);\
|
PyObject *m = Py_InitModule("_codecs_" #loc, __methods);\
|
||||||
|
if (m != NULL) \
|
||||||
(void)register_maps(m); \
|
(void)register_maps(m); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue