[Playlist View] Prevent assigning nil textField

Prevent somehow assigning nil textField contents, as well as the
tooltip text.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
main
Christopher Snowhill 2022-07-25 19:55:45 -07:00
parent 03c498c0fc
commit a2dacc067b
1 changed files with 2 additions and 2 deletions

View File

@ -544,11 +544,11 @@ static void *playlistControllerContext = &playlistControllerContext;
NSFont *font = [NSFont monospacedDigitSystemFontOfSize:fontSize weight:NSFontWeightRegular];
cellView.textField.font = font;
cellView.textField.stringValue = cellTextTruncated;
cellView.textField.stringValue = cellTextTruncated ?: @"";
cellView.textField.alignment = cellTextAlignment;
if(cellView.textField.intrinsicContentSize.width > cellView.textField.frame.size.width - 4)
cellView.textField.toolTip = cellTextTruncated;
cellView.textField.toolTip = cellTextTruncated ?: @"";
else
cellView.textField.toolTip = [pe statusMessage];