From fe40dff3bad032d903563403046fca1702b190c4 Mon Sep 17 00:00:00 2001 From: Chinh Nguyen Date: Wed, 1 Dec 2021 08:19:08 +1100 Subject: Bug [#2300] Abandon drag when rectangle is empty as empty image caused crash. --- cocoa/ScintillaCocoa.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cocoa') 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(); -- cgit v1.2.3