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 ++ doc/ScintillaHistory.html | 4 ++++ 2 files changed, 6 insertions(+) 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(); diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 32901b87c..35365dbda 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -608,6 +608,10 @@ Bug #2292.
  • + On Cocoa, fix crash when drag image empty. + Bug #2300. +
  • +
  • On GTK using Wayland, display autocompletion with window on a secondary monitor. Bug #2296, Bug #2261. -- cgit v1.2.3