Fix potential crash when hit testing StatusCollapseButton

This commit is contained in:
Shadowfacts 2024-04-15 22:50:31 -04:00
parent 756874949a
commit a92cf8c812
1 changed files with 2 additions and 2 deletions

View File

@ -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
}
}