--- src/plugins/platforms/cocoa/qcocoahelpers.mm.orig	2016-09-15 22:49:42.000000000 -0700
+++ src/plugins/platforms/cocoa/qcocoahelpers.mm	2017-09-24 00:56:23.000000000 -0700
@@ -544,15 +544,8 @@
     return NSMakeRect(rect.x(), flippedY, rect.width(), rect.height());
 }
 
-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
 {
-    // Verbatim copy if HIViewDrawCGImage (as shown on Carbon-Dev)
-    OSStatus err = noErr;
-
-    require_action(inContext != NULL, InvalidContext, err = paramErr);
-    require_action(inBounds != NULL, InvalidBounds, err = paramErr);
-    require_action(inImage != NULL, InvalidImage, err = paramErr);
-
     CGContextSaveGState( inContext );
     CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds));
     CGContextScaleCTM(inContext, 1, -1);
@@ -560,10 +553,6 @@
     CGContextDrawImage(inContext, *inBounds, inImage);
 
     CGContextRestoreGState(inContext);
-InvalidImage:
-InvalidBounds:
-InvalidContext:
-        return err;
 }
 
 Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
--- src/plugins/platforms/cocoa/qcocoahelpers.h.orig	2016-09-15 22:49:42.000000000 -0700
+++ src/plugins/platforms/cocoa/qcocoahelpers.h	2017-09-24 00:56:23.000000000 -0700
@@ -80,7 +80,7 @@
 // Creates a mutable shape, it's the caller's responsibility to release.
 HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion &region);
 
-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
 
 NSDragOperation qt_mac_mapDropAction(Qt::DropAction action);
 NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions);
