summaryrefslogtreecommitdiffstats
path: root/macosx/HBCore.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-08-12 10:19:00 +0200
committerDamiano Galassi <[email protected]>2019-08-12 10:19:00 +0200
commitc5a4d181ebedbdee2bdfefeffa28128d0b9c95c1 (patch)
tree635e3d036b7065987f29d38489838ceb6cdd11eb /macosx/HBCore.m
parent76d08e5d4bb6287de03519cf43cc298d2d896a7a (diff)
MacGui: enable and fix more warnings. Review nullability annotations.
Diffstat (limited to 'macosx/HBCore.m')
-rw-r--r--macosx/HBCore.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/macosx/HBCore.m b/macosx/HBCore.m
index d784b92c4..c720c5795 100644
--- a/macosx/HBCore.m
+++ b/macosx/HBCore.m
@@ -391,7 +391,7 @@ typedef void (^HBCoreCleanupHandler)(void);
hb_image_close(&image);
}
- if (angle || flipped)
+ if (img && (angle || flipped))
{
CGImageRef rotatedImg = CGImageRotated(img, angle, flipped);
CGImageRelease(img);
@@ -410,7 +410,7 @@ typedef void (^HBCoreCleanupHandler)(void);
#pragma mark - Encodes
-- (void)encodeJob:(HBJob *)job progressHandler:(HBCoreProgressHandler)progressHandler completionHandler:(HBCoreCompletionHandler)completionHandler;
+- (void)encodeJob:(HBJob *)job progressHandler:(HBCoreProgressHandler)progressHandler completionHandler:(HBCoreCompletionHandler)completionHandler
{
NSAssert(self.state == HBStateIdle, @"[HBCore encodeJob:] called while another scan or encode already in progress");
NSAssert(job, @"[HBCore encodeJob:] called with nil job");