From adef4840deae535f564efb445539efc1add85487 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 24 Sep 2019 14:45:29 -0400 Subject: [PATCH] Don't crash on login cancelled --- Tusker/Screens/Onboarding/OnboardingViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tusker/Screens/Onboarding/OnboardingViewController.swift b/Tusker/Screens/Onboarding/OnboardingViewController.swift index 6e25933f..7df60929 100644 --- a/Tusker/Screens/Onboarding/OnboardingViewController.swift +++ b/Tusker/Screens/Onboarding/OnboardingViewController.swift @@ -67,7 +67,7 @@ extension OnboardingViewController: InstanceSelectorTableViewControllerDelegate let url = url, let components = URLComponents(url: url, resolvingAgainstBaseURL: true), let item = components.queryItems?.first(where: { $0.name == "code" }), - let authCode = item.value else { fatalError() } + let authCode = item.value else { return } MastodonController.authorize(authorizationCode: authCode) { DispatchQueue.main.async {