Skip to content

Commit

Permalink
lock to access the image renderingMode
Browse files Browse the repository at this point in the history
Missing with #1629
  • Loading branch information
Greg Bolsinga committed Sep 6, 2019
1 parent d0ab404 commit 13e9106
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 13e9106

Please sign in to comment.