Skip to content

Commit

Permalink
fix: get string from pasteboard may be nil
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Dec 19, 2023
1 parent 23bbb42 commit 06cf680
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Easydict/Feature/ViewController/View/TextView/EZTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ - (void)pasteAsPlainText:(id)sender {
NSString *pasteboardString = [pasteboard stringForType:stringType];
pasteboardString = [pasteboardString trim];

// pasteboardString may be nil
if (!pasteboardString) {
return;
}

BOOL enableModifyParagraphSpacing = NO;

// Empty text.
Expand Down

0 comments on commit 06cf680

Please sign in to comment.