diff --git a/QBImagePicker/QBAssetsViewController.m b/QBImagePicker/QBAssetsViewController.m index fec84b5c..09a792e5 100644 --- a/QBImagePicker/QBAssetsViewController.m +++ b/QBImagePicker/QBAssetsViewController.m @@ -666,6 +666,12 @@ - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollection CGFloat width = (CGRectGetWidth(self.view.frame) - 2.0 * (numberOfColumns - 1)) / numberOfColumns; + // Fatal Exception: NSInternalInconsistencyException negative sizes are not supported in the flow layout + // The width and height of the specified item. Both values must be greater than 0. + if (width <= 0) { + width = 1.0f; + } + return CGSizeMake(width, width); }