Skip to content

Commit

Permalink
Merge 67b6892 into 4654f66
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed Apr 6, 2023
2 parents 4654f66 + 67b6892 commit f393202
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixes

- Crash when serializing invalid objects (#2858)
- Possible crash in Core Data tracking (#2865)

## 8.4.0

Expand Down
5 changes: 3 additions & 2 deletions Sources/Sentry/SentryCoreDataTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ - (NSString *)descriptionForOperations:
{
NSMutableDictionary<NSString *, NSNumber *> *result = [NSMutableDictionary new];

for (NSManagedObject *item in entities) {
NSString *cl = item.entity.name;
for (id item in entities) {
// entity.name is nullable! fall back to old behavior
NSString *cl = ((NSManagedObject *)item).entity.name ?: NSStringFromClass([item class]);
NSNumber *count = result[cl];
result[cl] = [NSNumber numberWithInt:count.intValue + 1];
}
Expand Down

0 comments on commit f393202

Please sign in to comment.