From a92cf8c812a03e282e4d7893944fd0806a117582 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 15 Apr 2024 22:50:31 -0400 Subject: [PATCH] Fix potential crash when hit testing StatusCollapseButton --- Tusker/Views/Status/StatusCollapseButton.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tusker/Views/Status/StatusCollapseButton.swift b/Tusker/Views/Status/StatusCollapseButton.swift index a0a2d513cf..37e3779c7f 100644 --- a/Tusker/Views/Status/StatusCollapseButton.swift +++ b/Tusker/Views/Status/StatusCollapseButton.swift @@ -10,7 +10,7 @@ import UIKit class StatusCollapseButton: UIButton { - private var interactionBounds: CGRect! + private var interactionBounds: CGRect? override func layoutSubviews() { super.layoutSubviews() @@ -19,7 +19,7 @@ class StatusCollapseButton: UIButton { } override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { - return interactionBounds.contains(point) + return interactionBounds?.contains(point) ?? false } }