fix: index out bounds issue. resolve #255

This commit is contained in:
CMK 2021-08-05 15:24:54 +08:00
parent da1d146465
commit 09f77c3876
1 changed files with 1 additions and 0 deletions

View File

@ -207,6 +207,7 @@ extension MosaicImageViewContainer {
func setupImageViews(count: Int, maxSize: CGSize) -> [ConfigurableMosaic] {
reset()
let count = min(4, max(0, count))
guard count > 1 else {
return []
}