From a2dacc067b3935b7633b4dab3bf79cf790e01bbf Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Mon, 25 Jul 2022 19:55:45 -0700 Subject: [PATCH] [Playlist View] Prevent assigning nil textField Prevent somehow assigning nil textField contents, as well as the tooltip text. Signed-off-by: Christopher Snowhill --- Playlist/PlaylistController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index e315f404f..5c7b37f66 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -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];