There was an error while loading. Please reload this page.
1 parent b42ce64 commit a3e97f8Copy full SHA for a3e97f8
1 file changed
src/_macosx.m
@@ -686,7 +686,24 @@ bool mpl_check_modifier(bool present, PyObject* list, char const* name)
686
{
687
[self->window close];
688
self->window = NULL;
689
- [super destroy];
+
690
+ // call super().destroy()
691
+ PyObject *super_obj = PyObject_CallFunctionObjArgs(
692
+ (PyObject *)&PySuper_Type,
693
+ (PyObject *)FigureManagerType,
694
+ self,
695
+ NULL
696
+ );
697
+ if (super_obj == NULL) {
698
+ return NULL; // error
699
+ }
700
+ PyObject *result = PyObject_CallMethod(super_obj, "destroy", NULL);
701
+ Py_DECREF(super_obj);
702
+ if (result == NULL) {
703
704
705
+ Py_DECREF(result);
706
707
Py_RETURN_NONE;
708
}
709
0 commit comments