mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
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:
@@ -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)];
|
||||
|
||||
Reference in New Issue
Block a user