Refs #1700. Fixed: setItemPrototype crash.

Setting the item prototype without first adding the collection view to a view would cause a crash, as would reloadContent.

This fix makes sure the collection view doesn't try to tile itself unless it has a frame.
This commit is contained in:
Alexander Ljungberg
2013-02-08 11:46:08 +00:00
parent 1248b1fb29
commit 21efb90b4c
+4
View File
@@ -492,6 +492,10 @@ var HORIZONTAL_MARGIN = 2;
oldItemSize = _itemSize,
storedFrameSize = _storedFrameSize;
// No need to tile if we are not yet placed in the view hierarchy.
if (!frameSize)
return;
[self _updateMinMaxItemSizeIfNeeded];
[self _computeGridWithSize:frameSize count:AT_REF(count)];