Skip to content

Commit

Permalink
Correct some dereferences in as_log_verbose invocations (TextureGroup…
Browse files Browse the repository at this point in the history
  • Loading branch information
wiseoldduck authored and Adlai-Holler committed Feb 14, 2019
1 parent b01ebd6 commit affa588
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Source/ASDisplayNode+Layout.mm
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ - (void)_u_measureNodeWithBoundsIfNecessary:(CGRect)bounds
as_log_verbose(ASLayoutLog(), "Node %@, bounds size %@, calculatedSize %@, calculatedIsDirty %d",
self,
NSStringFromCGSize(boundsSizeForLayout),
NSStringFromCGSize(_calculatedDisplayNodeLayout->layout.size),
_calculatedDisplayNodeLayout->version < _layoutVersion);
NSStringFromCGSize(_calculatedDisplayNodeLayout.layout.size),
_calculatedDisplayNodeLayout.version < _layoutVersion);
// _calculatedDisplayNodeLayout is not reusable we need to transition to a new one
[self cancelLayoutTransition];

Expand All @@ -356,9 +356,9 @@ - (void)_u_measureNodeWithBoundsIfNecessary:(CGRect)bounds
} else if (!nextLayout.isValid(_layoutVersion)) {
as_log_verbose(ASLayoutLog(), "Pending layout is stale.");
} else if (layoutSizeDifferentFromBounds) {
as_log_verbose(ASLayoutLog(), "Pending layout size %@ doesn't match bounds size.", NSStringFromCGSize(nextLayout->layout.size));
as_log_verbose(ASLayoutLog(), "Pending layout size %@ doesn't match bounds size.", NSStringFromCGSize(nextLayout.layout.size));
} else {
as_log_verbose(ASLayoutLog(), "Using pending layout %@.", nextLayout->layout);
as_log_verbose(ASLayoutLog(), "Using pending layout %@.", nextLayout.layout);
pendingLayoutApplicable = YES;
}

Expand Down Expand Up @@ -405,7 +405,7 @@ - (void)_u_measureNodeWithBoundsIfNecessary:(CGRect)bounds
}

// Prepare to transition to nextLayout
ASDisplayNodeAssertNotNil(nextLayout.layout, @"nextLayout->layout should not be nil! %@", self);
ASDisplayNodeAssertNotNil(nextLayout.layout, @"nextLayout.layout should not be nil! %@", self);
_pendingLayoutTransition = [[ASLayoutTransition alloc] initWithNode:self
pendingLayout:nextLayout
previousLayout:_calculatedDisplayNodeLayout];
Expand Down

0 comments on commit affa588

Please sign in to comment.