From 1bed49268aceb0509737637a0d113e585da7110e Mon Sep 17 00:00:00 2001 From: Anthony Li Date: Sun, 14 Apr 2024 12:52:52 -0400 Subject: [PATCH] Prevent activityIndicatorBackground force unwrapping crash --- PennMobile/Auth/PennLoginController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PennMobile/Auth/PennLoginController.swift b/PennMobile/Auth/PennLoginController.swift index 08a4aff89..9cd4dd610 100755 --- a/PennMobile/Auth/PennLoginController.swift +++ b/PennMobile/Auth/PennLoginController.swift @@ -75,8 +75,10 @@ class PennLoginController: UIViewController, WKUIDelegate, WKNavigationDelegate override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() - activityIndicatorBackground.center = view.center - view.bringSubviewToFront(activityIndicatorBackground) + if let activityIndicatorBackground { + activityIndicatorBackground.center = view.center + view.bringSubviewToFront(activityIndicatorBackground) + } } func webView(