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