diff --git a/src/_macosx.m b/src/_macosx.m index 30fdf8fbd75c..d124ee3322b9 100755 --- a/src/_macosx.m +++ b/src/_macosx.m @@ -1869,7 +1869,7 @@ static void context_cleanup(const void* info) CFTimeInterval interval; PyObject* py_interval = NULL, * py_single = NULL, * py_on_timer = NULL; int single; - runloop = CFRunLoopGetCurrent(); + runloop = CFRunLoopGetMain(); if (!runloop) { PyErr_SetString(PyExc_RuntimeError, "Failed to obtain run loop"); return NULL;