Skip to content

Commit

Permalink
Prevent crashing during non critical logging at rotation (#1770)
Browse files Browse the repository at this point in the history
  • Loading branch information
foxware00 committed Feb 11, 2020
1 parent 3674402 commit 7798440
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Details/ASTraitCollection.mm
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ BOOL ASPrimitiveTraitCollectionIsEqualToASPrimitiveTraitCollection(ASPrimitiveTr
}
if (AS_AVAILABLE_IOS(10)) {
[props addObject:@{ @"layoutDirection": AS_NSStringFromUITraitEnvironmentLayoutDirection(traits.layoutDirection) }];
[props addObject:@{ @"preferredContentSizeCategory": traits.preferredContentSizeCategory }];
if (traits.preferredContentSizeCategory != nil) {
[props addObject:@{ @"preferredContentSizeCategory": traits.preferredContentSizeCategory }];
}
[props addObject:@{ @"displayGamut": AS_NSStringFromUIDisplayGamut(traits.displayGamut) }];
}

Expand Down

0 comments on commit 7798440

Please sign in to comment.