diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c5cd3a..4b75224 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# Unreleased +- Fix null pointer warning from profiler. (#124) + # v9.4.1 (CocoaPods Only) - The v9.4.0 podspec did not include the intended dependency range for nanopb ([firebase-ios-sdk/#12477](https://github.com/firebase/firebase-ios-sdk/issues/12477)) diff --git a/GoogleDataTransport/GDTCORLibrary/GDTCORLogSourceMetrics.m b/GoogleDataTransport/GDTCORLibrary/GDTCORLogSourceMetrics.m index aaabb47..9910bf0 100644 --- a/GoogleDataTransport/GDTCORLibrary/GDTCORLogSourceMetrics.m +++ b/GoogleDataTransport/GDTCORLibrary/GDTCORLogSourceMetrics.m @@ -52,7 +52,7 @@ typedef NSDictionary GDTCORDroppedEventCounter; // If the dropped event counter for this event's mapping ID is `nil`, // an empty mutable counter is returned. NSMutableDictionary *eventCounter = - [NSMutableDictionary dictionaryWithDictionary:eventCounterByLogSource[event.mappingID]]; + [NSMutableDictionary dictionaryWithDictionary:eventCounterByLogSource[event.mappingID] ?: @{}]; // Increment the log source metrics for the given reason. NSInteger currentEventCountForReason = [eventCounter[@(reason)] integerValue];