kishikawakatsumi / IBPCollectionViewCompositionalLayout

Backport of UICollectionViewCompositionalLayout to earlier iOS 12
MIT License
1.55k stars 148 forks source link

Avoid division by zero #136

Open IntMatrix opened 4 years ago

IntMatrix commented 4 years ago

There were discovered some crashes in the library. NSArray<IBPCollectionCompositionalLayoutSolverResult *> *results = self.results; There are no checks in case when results.count == 0 before division by zero. So, these checks fix those crashes.

alphatroya commented 4 years ago

I've faced this issue recently. I think this PR should be merged.

andrewprocter commented 4 years ago

Add another hat in the ring for merging this, also faced this issue recently.

RGG-jayoung commented 3 years ago

+1 for me as well. Can this be merged?

alexandreraulin commented 3 years ago

+1, that's possible to merge it ?