diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2024-09-18 08:11:28 +1000 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2024-09-18 08:11:28 +1000 |
commit | 914f855427fa9fedf585ef835a5700cf0426b002 (patch) | |
tree | 2493d27ccfe2d3a7d43976851bb89536b7577e23 | |
parent | 5977b000998149b60a80fa4bb779a663078b951a (diff) | |
download | scintilla-mirror-914f855427fa9fedf585ef835a5700cf0426b002.tar.gz |
Fix potential NULL use and avoid warning.
-rw-r--r-- | cocoa/ScintillaCocoa.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 8419a4157..b1e242cc9 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1516,7 +1516,8 @@ void ScintillaCocoa::StartDrag() { CGImageRelease(imagePixmap); NSImage *image = [[NSImage alloc] initWithSize: selectionRectangle.size]; - [image addRepresentation: bitmap]; + if (bitmap) + [image addRepresentation: bitmap]; NSImage *dragImage = [[NSImage alloc] initWithSize: selectionRectangle.size]; dragImage.backgroundColor = [NSColor clearColor]; |