From 358db2bbdc59775f4bdc06344032d85e8400d7e0 Mon Sep 17 00:00:00 2001 From: Hilmar Gústafsson Date: Mon, 16 Oct 2017 21:01:39 +0200 Subject: Fix intermittent crashes on iOS - added to header file. (#1673) Fix intermittent crashes on iOS --- src/async/imap/MCIMAPOperation.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/async/imap/MCIMAPOperation.cpp') diff --git a/src/async/imap/MCIMAPOperation.cpp b/src/async/imap/MCIMAPOperation.cpp index 724c8215..e0dae173 100644 --- a/src/async/imap/MCIMAPOperation.cpp +++ b/src/async/imap/MCIMAPOperation.cpp @@ -177,9 +177,16 @@ void IMAPOperation::beforeMain() } void IMAPOperation::afterMain() +{ + retain(); + performMethodOnMainThread((Object::Method) &IMAPOperation::afterMainOnMainThread, NULL); +} + +void IMAPOperation::afterMainOnMainThread() { if (mSession->session()->isAutomaticConfigurationDone()) { mSession->owner()->automaticConfigurationDone(mSession->session()); mSession->session()->resetAutomaticConfigurationDone(); } + release(); } -- cgit v1.2.3