mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 04:00:42 +00:00
FIXED: Crash when clicking on an empty CPTableView with variable row height.
Previously, clicking anywhere in an empty CPTableView with variable row height was causing a crash due to the code trying to find the latest cached row height. This patch adds a check to ensure the last cached row height is not nil.
This commit is contained in:
1 parent
047983d7bf
commit
1814f6b545
1 file changed
+1
-1
@@ -2057,7 +2057,7 @@ NOT YET IMPLEMENTED
|
||||
// search the (potentially large number of) rows for nothing.
|
||||
var heightInfo = [_cachedRowHeights lastObject];
|
||||
|
||||
if (aPoint.y >= ROW_BOTTOM(heightInfo))
|
||||
if (!heightInfo || aPoint.y >= ROW_BOTTOM(heightInfo))
|
||||
return -1;
|
||||
|
||||
return [_cachedRowHeights indexOfObject:aPoint
|
||||
|
||||
Reference in new issue
Block a user