diff options
| author | Hye-Shik Chang <hyeshik@gmail.com> | 2006-03-06 07:51:19 +0000 |
|---|---|---|
| committer | Hye-Shik Chang <hyeshik@gmail.com> | 2006-03-06 07:51:19 +0000 |
| commit | 32feb8592f8e7b09a0f7c46a82851628d1c77d34 (patch) | |
| tree | 3fe829ef2af017e91a7922ee74111661d7551e55 /Modules/cjkcodecs | |
| parent | 82f6cc4728353cf169d45e7a1499226896500ed8 (diff) | |
| download | cpython-git-32feb8592f8e7b09a0f7c46a82851628d1c77d34.tar.gz | |
Check NULL if Py_InitModule fails.
Diffstat (limited to 'Modules/cjkcodecs')
| -rw-r--r-- | Modules/cjkcodecs/cjkcodecs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h index 9c321622aa..b266c8f9b4 100644 --- a/Modules/cjkcodecs/cjkcodecs.h +++ b/Modules/cjkcodecs/cjkcodecs.h @@ -388,7 +388,8 @@ errorexit: init_codecs_##loc(void) \ { \ PyObject *m = Py_InitModule("_codecs_" #loc, __methods);\ - (void)register_maps(m); \ + if (m != NULL) \ + (void)register_maps(m); \ } #endif |
