Check return result from Py_InitModule*().  This API can fail.

Probably should be backported.
diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c
index 904c64b..8c70d95 100644
--- a/Modules/rgbimgmodule.c
+++ b/Modules/rgbimgmodule.c
@@ -756,6 +756,8 @@
 {
 	PyObject *m, *d;
 	m = Py_InitModule("rgbimg", rgbimg_methods);
+	if (m == NULL)
+		return;
 	d = PyModule_GetDict(m);
 	ImgfileError = PyErr_NewException("rgbimg.error", NULL, NULL);
 	if (ImgfileError != NULL)