diff --git a/Source/ASTextNode2.mm b/Source/ASTextNode2.mm index 46c49e6e4..c6ccc6e2e 100644 --- a/Source/ASTextNode2.mm +++ b/Source/ASTextNode2.mm @@ -164,7 +164,6 @@ @implementation ASTextNode { NSAttributedString *_attributedText; NSAttributedString *_truncationAttributedText; NSAttributedString *_additionalTruncationMessage; - NSAttributedString *_composedTruncationText; NSArray *_pointSizeScaleFactors; NSLineBreakMode _truncationMode; @@ -1232,22 +1231,20 @@ - (NSRange)_additionalTruncationMessageRangeWithVisibleRange:(NSRange)visibleRan - (NSAttributedString *)_locked_composedTruncationText { DISABLED_ASAssertLocked(__instanceLock__); - if (_composedTruncationText == nil) { - if (_truncationAttributedText != nil && _additionalTruncationMessage != nil) { - NSMutableAttributedString *newComposedTruncationString = [[NSMutableAttributedString alloc] initWithAttributedString:_truncationAttributedText]; - [newComposedTruncationString.mutableString appendString:@" "]; - [newComposedTruncationString appendAttributedString:_additionalTruncationMessage]; - _composedTruncationText = newComposedTruncationString; - } else if (_truncationAttributedText != nil) { - _composedTruncationText = _truncationAttributedText; - } else if (_additionalTruncationMessage != nil) { - _composedTruncationText = _additionalTruncationMessage; - } else { - _composedTruncationText = DefaultTruncationAttributedString(); - } - _composedTruncationText = [self _locked_prepareTruncationStringForDrawing:_composedTruncationText]; + NSAttributedString *composedTruncationText = nil; + if (_truncationAttributedText != nil && _additionalTruncationMessage != nil) { + NSMutableAttributedString *newComposedTruncationString = [[NSMutableAttributedString alloc] initWithAttributedString:_truncationAttributedText]; + [newComposedTruncationString.mutableString appendString:@" "]; + [newComposedTruncationString appendAttributedString:_additionalTruncationMessage]; + composedTruncationText = newComposedTruncationString; + } else if (_truncationAttributedText != nil) { + composedTruncationText = _truncationAttributedText; + } else if (_additionalTruncationMessage != nil) { + composedTruncationText = _additionalTruncationMessage; + } else { + composedTruncationText = DefaultTruncationAttributedString(); } - return _composedTruncationText; + return [self _locked_prepareTruncationStringForDrawing:composedTruncationText]; } /**