aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2015-04-01 09:31:20 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2015-04-01 09:31:20 +1100
commit6359d1166f8d7f31330ec7e1216899732e63316b (patch)
tree1d4cea5c1e4e25d5a740370f43980d546348a38c /cocoa
parent0fe3f9bd723e4f738fa8783875cf6959b515a935 (diff)
downloadscintilla-mirror-6359d1166f8d7f31330ec7e1216899732e63316b.tar.gz
Bug [#1709]. Check whether pixmap is NULL before using to create bitmap.
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/ScintillaCocoa.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index 45637b28a..69a8a4c14 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1446,7 +1446,8 @@ void ScintillaCocoa::StartDrag()
if (pixmap)
{
CGImageRef imagePixmap = pixmap->GetImage();
- bitmap = [[[NSBitmapImageRep alloc] initWithCGImage: imagePixmap] autorelease];
+ if (imagePixmap)
+ bitmap = [[[NSBitmapImageRep alloc] initWithCGImage: imagePixmap] autorelease];
CGImageRelease(imagePixmap);
pixmap->Release();
delete pixmap;