From 33184304552a632fb4d4d9da6be81adbf0089b97 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 1 Nov 2021 11:31:55 -0500 Subject: [PATCH] fix: crash in capitalizing trackername when no trackername (#2076) --- qt/FaviconCache.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt/FaviconCache.cc b/qt/FaviconCache.cc index 333c19946..75ff6b93a 100644 --- a/qt/FaviconCache.cc +++ b/qt/FaviconCache.cc @@ -107,7 +107,10 @@ void FaviconCache::ensureCacheDirHasBeenScanned() QString FaviconCache::getDisplayName(Key const& key) { auto name = key; - name[0] = name.at(0).toTitleCase(); + if (!name.isEmpty()) + { + name.front() = name.front().toTitleCase(); + } return name; }