From 1a63407661a9cffe4b880ad6394a5ba326dbdf0c Mon Sep 17 00:00:00 2001 From: Abhishek Banthia <8280282+n0shake@users.noreply.github.com> Date: Sat, 16 Apr 2022 10:15:09 -0400 Subject: [PATCH] Fix EXC_BAD_INSTRUCTION. --- Clocker/Onboarding/OnboardingSearchController.swift | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Clocker/Onboarding/OnboardingSearchController.swift b/Clocker/Onboarding/OnboardingSearchController.swift index b119d23..f02426b 100644 --- a/Clocker/Onboarding/OnboardingSearchController.swift +++ b/Clocker/Onboarding/OnboardingSearchController.swift @@ -40,6 +40,8 @@ class OnboardingSearchController: NSViewController { super.viewDidLoad() view.wantsLayer = true + + searchResultsDataSource = SearchDataSource(with: searchBar, location: .onboarding) resultsTableView.isHidden = true resultsTableView.delegate = self @@ -70,16 +72,6 @@ class OnboardingSearchController: NSViewController { setupUndoButton() } - override func viewWillAppear() { - super.viewWillAppear() - searchResultsDataSource = SearchDataSource(with: searchBar, location: .onboarding) - } - - override func viewWillDisappear() { - super.viewWillDisappear() - searchResultsDataSource = nil - } - deinit { if let themeDidChangeNotif = themeDidChangeNotification { NotificationCenter.default.removeObserver(themeDidChangeNotif)