From 5b820b270c0004049dd4d948020cf007d05b625e Mon Sep 17 00:00:00 2001 From: daboe01 Date: Fri, 13 Mar 2026 16:03:30 +0100 Subject: [PATCH] fixed: smartpaste crash --- AppKit/CPTextView/CPTextView.j | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 43b0a7a8b..1ea9dbef6 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -475,6 +475,9 @@ var kDelegateRespondsTo_textShouldBeginEditing if (!stringForPasting) return; + if (![stringForPasting isKindOfClass:[CPAttributedString class]]) + stringForPasting = [[CPAttributedString alloc] initWithString:stringForPasting attributes:nil]; + var shouldUseSmartPasting = [self _shouldUseSmartPasting]; if (shouldUseSmartPasting)