From 1ee9a3f279d71ebe96486c69ae706924f92bb2d4 Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Mon, 8 Jan 2018 13:47:45 +0100 Subject: [PATCH] Fixed: Check if the correct delegate method is implemented before calling it --- AppKit/CPTextView/CPTextView.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 80019428a..ad00aa3c0 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -2225,7 +2225,7 @@ var kDelegateRespondsTo_textShouldBeginEditing - (CPDictionary)_sendDelegateShouldChangeTypingAttributes:(CPDictionary)typingAttributes toAttributes:(CPDictionary)attributes { - if (!(_delegateRespondsToSelectorMask & kDelegateRespondsTo_textView_doCommandBySelector)) + if (!(_delegateRespondsToSelectorMask & kDelegateRespondsTo_textView_shouldChangeTypingAttributes_toAttributes)) return [CPDictionary dictionary]; return [_delegate textView:self shouldChangeTypingAttributes:typingAttributes toAttributes:attributes];