From 16f76e69fe28ca126eaef6913aa593a655e09d79 Mon Sep 17 00:00:00 2001 From: tyeen Date: Thu, 26 Mar 2015 00:24:08 +0900 Subject: [PATCH] Check for nil pointer. --- Backlight/AAABacklight.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Backlight/AAABacklight.m b/Backlight/AAABacklight.m index 181da90..cd37ae4 100755 --- a/Backlight/AAABacklight.m +++ b/Backlight/AAABacklight.m @@ -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