aboutsummaryrefslogtreecommitdiffhomepage
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
parente65fc59e6cc5b7ef22ba92d13870d8e143149b88 (diff)
downloadscintilla-mirror-fe40dff3bad032d903563403046fca1702b190c4.tar.gz
Bug [#2300] Abandon drag when rectangle is empty as empty image caused crash.
-rw-r--r--cocoa/ScintillaCocoa.mm2
-rw-r--r--doc/ScintillaHistory.html4
2 files changed, 6 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();
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 @@
<a href="https://sourceforge.net/p/scintilla/bugs/2292/">Bug #2292</a>.
</li>
<li>
+ On Cocoa, fix crash when drag image empty.
+ <a href="https://sourceforge.net/p/scintilla/bugs/2300/">Bug #2300</a>.
+ </li>
+ <li>
On GTK using Wayland, display autocompletion with window on a secondary monitor.
<a href="https://sourceforge.net/p/scintilla/bugs/2296/">Bug #2296</a>,
<a href="https://sourceforge.net/p/scintilla/bugs/2261/">Bug #2261</a>.