Skip to content

Commit

Permalink
Check for nil pointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeen committed Mar 25, 2015
1 parent fdf3963 commit 16f76e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Backlight/AAABacklight.m
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ - (void)colorPanelWillClose:(NSNotification *)notification
- (void)updateBacklightViewWithTextView:(NSTextView *)textView
{
// Before changing the textView's instance, remove the old one's highlight.
if (self.textView != textView &&
if (self.textView != nil &&
self.textView != textView &&
self.currentMode == AAABacklightModeUnderneath &&
[self.textView.layoutManager temporaryAttribute:NSBackgroundColorAttributeName
atCharacterIndex:self.currentLineRange.location
Expand Down

0 comments on commit 16f76e6

Please sign in to comment.