From 242c1d094240978d7c1e018f099826562c0cb585 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 14 Jan 2011 09:54:51 -0500 Subject: [PATCH] Only message the delegate if the line actually exists --- Source/BSLineNumberRulerView.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/BSLineNumberRulerView.mm b/Source/BSLineNumberRulerView.mm index 33c5f5c..66647d6 100644 --- a/Source/BSLineNumberRulerView.mm +++ b/Source/BSLineNumberRulerView.mm @@ -185,7 +185,8 @@ const CGFloat kRulerRightPadding = 2.5; NSPoint point = [theEvent locationInWindow]; point = [self convertPoint:point fromView:nil]; NSUInteger line = [self lineNumberAtPoint:point]; - [sourceView_.delegate gutterClickedAtLine:line forFile:sourceView_.file]; + if (line != NSNotFound) + [sourceView_.delegate gutterClickedAtLine:line forFile:sourceView_.file]; } // Private ///////////////////////////////////////////////////////////////////// -- 2.43.5