steipete/PSTCollectionView — pull request #108 by inamiy (2012-11-22 05:47:19+00:00)
Title: Fix validateLayoutInRect

When collectionView doesn't have any data,
`[UICollectionViewLayout layoutAttributesForElementsInRect:]` will be called
with `rect` being as `CGRectZero`, but current `PSTCollectionView` doesn't behave the same.

It will cause crash when data is fully deleted & reloaded,
which leads to calling layout's `layoutAttributesForElementsInRect:` and then `layoutAttributesForItemAtIndexPath:` with some non-existing indexPaths.