From efcebed18253e0c003ecdf0eea053618b18b5464 Mon Sep 17 00:00:00 2001 From: nickcheng Date: Wed, 20 Jan 2021 16:23:01 +0900 Subject: [PATCH] Fixed the crash when ownerVC is nil. --- Sources/Core.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Core.swift b/Sources/Core.swift index f277117b..6b76e020 100644 --- a/Sources/Core.swift +++ b/Sources/Core.swift @@ -847,7 +847,8 @@ class Core: NSObject, UIGestureRecognizerDelegate { ownerVC.notifyDidMove() }, completion: { [weak self] in - guard let self = self else { return } + guard let self = self, + self.ownerVC != nil else { return } self.layoutAdapter.activateLayout(for: targetPosition, forceLayout: true) completion() })