Permalink
Browse files

Fix stack overflow caused during scroll view delegate callbacks

  • Loading branch information...
1 parent ee64c5d commit efc4f9948db0a89435627bde32d2232efc04d020 @sibljon sibljon committed with Feb 28, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 PSTCollectionView/PSTCollectionView.m
@@ -1227,7 +1227,9 @@ - (void)setCollectionViewLayout:(PSTCollectionViewLayout *)layout {
}
- (void)setDelegate:(id<PSTCollectionViewDelegate>)delegate {
- self.extVars.collectionViewDelegate = delegate;
+ if (self.extVars.collectionViewDelegate != (id)self) {
+ self.extVars.collectionViewDelegate = delegate;
+ }
// Managing the Selected Cells
_collectionViewFlags.delegateShouldSelectItemAtIndexPath = [self.delegate respondsToSelector:@selector(collectionView:shouldSelectItemAtIndexPath:)];

0 comments on commit efc4f99

Please sign in to comment.