summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r--Modules/_tkinter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 630ce72..f6cd88d 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -3133,8 +3133,10 @@ PyInit__tkinter(void)
PyDict_SetItemString(d, "TkappType", (PyObject *)&Tkapp_Type);
- if (PyType_Ready(&Tktt_Type) < 0)
+ if (PyType_Ready(&Tktt_Type) < 0) {
+ Py_DECREF(m);
return NULL;
+ }
PyDict_SetItemString(d, "TkttType", (PyObject *)&Tktt_Type);
Py_TYPE(&PyTclObject_Type) = &PyType_Type;