summaryrefslogtreecommitdiffstats
path: root/Modules/termios.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/termios.c')
-rw-r--r--Modules/termios.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/termios.c b/Modules/termios.c
index a1d14a1..c53566c 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -910,6 +910,8 @@ PyInit_termios(void)
m = Py_InitModule4("termios", termios_methods, termios__doc__,
(PyObject *)NULL, PYTHON_API_VERSION);
+ if (m == NULL)
+ return;
if (TermiosError == NULL) {
TermiosError = PyErr_NewException("termios.error", NULL, NULL);