From 2abc07a4d2c64d69846664eb86470f593d26eafb Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 11 Nov 2019 10:59:51 -0300 Subject: [PATCH] Fix divide-by-zero crash. --- SignalMessaging/Views/VideoEditor/VideoEditorView.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SignalMessaging/Views/VideoEditor/VideoEditorView.swift b/SignalMessaging/Views/VideoEditor/VideoEditorView.swift index 98e9c08379..84b3d193e8 100644 --- a/SignalMessaging/Views/VideoEditor/VideoEditorView.swift +++ b/SignalMessaging/Views/VideoEditor/VideoEditorView.swift @@ -571,6 +571,10 @@ class TrimVideoTimelineView: UIView { } let thumbnailSize: CGFloat = height() + guard thumbnailSize > 0 else { + return + } + let thumbnailCount = UInt(ceil(width() / thumbnailSize)) for index in 0..