diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 2550ab68ca1..64298bf85d0 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -270,14 +270,12 @@ switch (m_draggedObjectType) { case GHOST_kDragnDropTypeBitmap: { - if ([NSImage canInitWithPasteboard:draggingPBoard]) { - NSImage *droppedImg = [[[NSImage alloc] initWithPasteboard:draggingPBoard] autorelease]; - data = droppedImg; // [draggingPBoard dataForType:NSPasteboardTypeTIFF]; - } - else { + if (![NSImage canInitWithPasteboard:draggingPBoard]) { return NO; } - + /* Caller must [release] the returned data in this case. */ + NSImage *droppedImg = [[NSImage alloc] initWithPasteboard:draggingPBoard]; + data = droppedImg; break; } case GHOST_kDragnDropTypeFilenames: