mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-01 07:57:01 +00:00
fix mem-leak analyzer warning
Although the analyzer is wrong here (highlighFramesetter property is synthesized), it doesn't hurt to use the instance variables.
This commit is contained in:
parent
3c25f25945
commit
070844e234
@ -826,8 +826,8 @@ static inline NSAttributedString * NSAttributedStringBySettingColorFromContext(N
|
||||
NSMutableAttributedString *highlightAttributedString = [self.renderedAttributedText mutableCopy];
|
||||
[highlightAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(id)[self.highlightedTextColor CGColor] range:NSMakeRange(0, highlightAttributedString.length)];
|
||||
|
||||
if (!self.highlightFramesetter) {
|
||||
self.highlightFramesetter = CTFramesetterCreateWithAttributedString((__bridge CFAttributedStringRef)highlightAttributedString);
|
||||
if (!_highlightFramesetter) {
|
||||
_highlightFramesetter = CTFramesetterCreateWithAttributedString((__bridge CFAttributedStringRef)highlightAttributedString);
|
||||
}
|
||||
|
||||
[self drawFramesetter:self.highlightFramesetter attributedString:highlightAttributedString textRange:textRange inRect:textRect context:c];
|
||||
|
Loading…
x
Reference in New Issue
Block a user