aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
authorChinh Nguyen <unknown>2021-12-01 08:19:08 +1100
committerChinh Nguyen <unknown>2021-12-01 08:19:08 +1100
commitfe40dff3bad032d903563403046fca1702b190c4 (patch)
tree5e6d8e1d9abfb71231770e7512cd50e59b6b7563 /cocoa
parente65fc59e6cc5b7ef22ba92d13870d8e143149b88 (diff)
downloadscintilla-mirror-fe40dff3bad032d903563403046fca1702b190c4.tar.gz
Bug [#2300] Abandon drag when rectangle is empty as empty image caused crash.
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/ScintillaCocoa.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index 8786e7949..dc70a0ae9 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1449,6 +1449,8 @@ void ScintillaCocoa::StartDrag() {
// Prepare drag image.
NSRect selectionRectangle = PRectangleToNSRect(rcSel);
+ if (NSIsEmptyRect(selectionRectangle))
+ return;
SCIContentView *content = ContentView();