Skip to content

Commit

Permalink
lock to access the image renderingMode (#1661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Bolsinga committed Sep 6, 2019
1 parent a403160 commit c24a21a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/ASImageNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,14 @@ - (void)setNeedsDisplayWithCompletion:(void (^ _Nullable)(BOOL canceled))display
- (void)tintColorDidChange
{
[super tintColorDidChange];
if (_image.renderingMode == UIImageRenderingModeAlwaysTemplate) {

BOOL isTemplateImage = NO;
{
AS::MutexLocker l(__instanceLock__);
isTemplateImage = (_image.renderingMode == UIImageRenderingModeAlwaysTemplate);
}

if (isTemplateImage) {
[self setNeedsDisplay];
}
}
Expand Down

0 comments on commit c24a21a

Please sign in to comment.