Fixed: crash with CPRuleEditor when dragging the first row

Previously, cappuccinos crashed when dragging to the top the first row of a CPRuleEditor.
This commit is contained in:
Alexandre Wilhelm committed 2015-09-22 15:01:19 -07:00
1 parent 3fcc37e086
commit 7a0b2c958b
1 file changed
+1 -1
+1 -1
View File
@@ -2121,7 +2121,7 @@ TODO: implement
return;
var point = [self convertPoint:[event locationInWindow] fromView:nil],
view = [_slices objectAtIndex:FLOOR(point.y / _sliceHeight)];
view = [_slices objectAtIndex:FLOOR(MAX(0, point.y) / _sliceHeight)];
if ([self _dragShouldBeginFromMouseDown:view])
[self _performDragForSlice:view withEvent:event];