1 diff --git a/pyfribidi.c b/pyfribidi.c
2 index 9a0120d..238134a 100644
5 @@ -148,10 +148,11 @@ init_pyfribidi (void)
7 #if PY_MAJOR_VERSION >= 3
8 PyObject *module = PyModule_Create (&pyfribidi_moduledef);
9 + if (module == NULL) return NULL;
11 PyObject *module = Py_InitModule ("_pyfribidi", PyfribidiMethods);
12 + if (module == NULL) return;
14 - if (module == NULL) return NULL;
16 PyModule_AddIntConstant (module, "RTL", (long) FRIBIDI_TYPE_RTL);
17 PyModule_AddIntConstant (module, "LTR", (long) FRIBIDI_TYPE_LTR);