aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
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;