From eaad6469bbb0c58c9ac7bb10e91d17838b6e0dd3 Mon Sep 17 00:00:00 2001 From: "Hedden, Kyle Matthew" Date: Fri, 11 Oct 2019 13:03:41 -0400 Subject: [PATCH] Move self.presentingViewController access onto the main thread. --- MVMCoreUI/BaseControllers/MFViewController.m | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/MVMCoreUI/BaseControllers/MFViewController.m b/MVMCoreUI/BaseControllers/MFViewController.m index edbabf80..bc8208dd 100644 --- a/MVMCoreUI/BaseControllers/MFViewController.m +++ b/MVMCoreUI/BaseControllers/MFViewController.m @@ -67,11 +67,13 @@ } - (void)dismiss { - if (self.presentingViewController) { - [[MVMCoreNavigationHandler sharedNavigationHandler] dismissViewController:self animated:YES]; - } else if (self.navigationController) { - [[MVMCoreNavigationHandler sharedNavigationHandler] popViewController:self animated:YES]; - } + [MVMCoreDispatchUtility performBlockOnMainThread:^{ + if (self.presentingViewController) { + [[MVMCoreNavigationHandler sharedNavigationHandler] dismissViewController:self animated:YES]; + } else if (self.navigationController) { + [[MVMCoreNavigationHandler sharedNavigationHandler] popViewController:self animated:YES]; + } + }]; } - (BOOL)isVisibleViewController {