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)
|
accessibilityElements.append(moreView)
|
||||||
}
|
}
|
||||||
|
|
||||||
self.aspectRatio = aspectRatio
|
self.aspectRatio = if aspectRatio.isNaN || aspectRatio.isInfinite {
|
||||||
|
16/9
|
||||||
|
} else {
|
||||||
|
aspectRatio
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
self.isHidden = true
|
self.isHidden = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user