From 26dcb319dccf6c618dfd298de02aafd7dec7d70a Mon Sep 17 00:00:00 2001 From: Abhishek Banthia <8280282+n0shake@users.noreply.github.com> Date: Sat, 20 Apr 2024 18:07:28 -0400 Subject: [PATCH] Fix modern slider crash for Floating Window. https://console.firebase.google.com/u/0/project/fiery-heat-5237/crashlytics/app/ios:com.abhishek.Clocker/issues/3db4f1d96ccc7068cf1299faf3481a81?time=last-seven-days&types=crash&sessionEventKey=cda636d65f4d44768d24b4a23093436d_1938420676542150209 --- Clocker/Preferences/Appearance/AppearanceViewController.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Clocker/Preferences/Appearance/AppearanceViewController.swift b/Clocker/Preferences/Appearance/AppearanceViewController.swift index c2d2f6b..8cfabdf 100644 --- a/Clocker/Preferences/Appearance/AppearanceViewController.swift +++ b/Clocker/Preferences/Appearance/AppearanceViewController.swift @@ -300,7 +300,9 @@ class AppearanceViewController: ParentViewController { if DataStore.shared().shouldDisplay(ViewType.showAppInForeground) { let floatingWindow = FloatingWindowController.shared() floatingWindow.updateTableContent() - floatingWindow.modernSlider.setNeedsDisplay(floatingWindow.modernSlider.bounds) + if let slider = floatingWindow.modernSlider { + slider.setNeedsDisplay(floatingWindow.modernSlider.bounds) + } if !panel { floatingWindow.updatePanelColor()