forked from shadowfacts/Tusker
Fix potential crash with invalid attachment aspect ratio
This commit is contained in:
parent
583d9b97dd
commit
e8a492ef7d
|
@ -295,7 +295,11 @@ class AttachmentsContainerView: UIView {
|
|||
accessibilityElements.append(moreView)
|
||||
}
|
||||
|
||||
self.aspectRatio = aspectRatio
|
||||
self.aspectRatio = if aspectRatio.isNaN || aspectRatio.isInfinite {
|
||||
16/9
|
||||
} else {
|
||||
aspectRatio
|
||||
}
|
||||
} else {
|
||||
self.isHidden = true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue