From 1c7245c22c10f3fbfcd6dabf19c1016bb784eacc Mon Sep 17 00:00:00 2001 From: Jan-E Date: Mon, 2 Oct 2017 02:30:59 +0200 Subject: [PATCH] Fix 'if (framerate)' analyze warning Xcode 9 running on macOS High Sierra issues this warning when analyzing with an attached iOS 11.0.1 iPad: > Pods/SDAVAssetExportSession/SDAVAssetExportSession.m:292:17: Converting a pointer value of type 'NSNumber *' to a primitive boolean value; instead, either compare the pointer to nil or call -boolValue This commit fixes it --- SDAVAssetExportSession.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDAVAssetExportSession.m b/SDAVAssetExportSession.m index 6fcd6c2..a8da0fb 100755 --- a/SDAVAssetExportSession.m +++ b/SDAVAssetExportSession.m @@ -289,7 +289,7 @@ - (AVMutableVideoComposition *)buildDefaultVideoComposition if (videoCompressionProperties) { NSNumber *frameRate = [videoCompressionProperties objectForKey:AVVideoAverageNonDroppableFrameRateKey]; - if (frameRate) + if ([frameRate boolValue]) { trackFrameRate = frameRate.floatValue; }