From b5dfa69152af9f4777f8e0c8487f1f6aa467224e Mon Sep 17 00:00:00 2001 From: Ryan Wilson Date: Wed, 31 Oct 2018 21:33:32 -0400 Subject: [PATCH] Fix static analysis warning in Core. Explicitly check for `nil` instead of using the `!` operator on the pointer. --- Firebase/Core/FIRApp.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m index ca61abf823e..3b352fa7d18 100644 --- a/Firebase/Core/FIRApp.m +++ b/Firebase/Core/FIRApp.m @@ -106,7 +106,7 @@ + (void)configure { // Read the Info.plist to see if the flag is set. At this point we can't check any user defaults // since the app isn't configured at all, so only rely on the Info.plist value. NSNumber *collectionEnabledPlistValue = [[self class] readDataCollectionSwitchFromPlist]; - if (!collectionEnabledPlistValue || [collectionEnabledPlistValue boolValue]) { + if (collectionEnabledPlistValue == nil || [collectionEnabledPlistValue boolValue]) { [[NSNotificationCenter defaultCenter] postNotificationName:kFIRAppDiagnosticsNotification object:nil