Skip to content

Commit

Permalink
Merge pull request jverkoey#427 from jverkoey/analyzer_warning
Browse files Browse the repository at this point in the history
[NIAttributedLabel] Fix analyzer warning with textFrame.
  • Loading branch information
stephanemoore committed Aug 22, 2013
2 parents 9686885 + 5d81bf1 commit 697d0f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/attributedlabel/src/NIAttributedLabel.m
Original file line number Diff line number Diff line change
@@ -1492,7 +1492,9 @@ - (void)drawTextInRect:(CGRect)rect {
CGPathAddRect(path, NULL, rect);
CTFrameRef textFrame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0, 0), path, NULL);
self.textFrame = textFrame;
CFRelease(textFrame);
if (textFrame) {
CFRelease(textFrame);
}
CGPathRelease(path);
CFRelease(framesetter);
}

0 comments on commit 697d0f4

Please sign in to comment.