Add nullptr-check for iconTheme
KIconLoader::global()->theme() might return null. Thus we need to guard for this case (happens e.g. on build.kde.org). This results in iconThemeMetadataPath not being set, which is fine as that condition is handled later on. CCMAIL: notmart@gmail.com Reviewed-By: Bhushan Shah
This commit is contained in:
parent
8d3ec9589c
commit
035e061e13
@ -180,7 +180,9 @@ bool ThemePrivate::useCache()
|
||||
if (isRegularTheme) {
|
||||
themeMetadataPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % themeName % QLatin1Literal("/metadata.desktop"));
|
||||
const auto *iconTheme = KIconLoader::global()->theme();
|
||||
if (iconTheme) {
|
||||
iconThemeMetadataPath = iconTheme->dir() + "index.theme";
|
||||
}
|
||||
|
||||
Q_ASSERT(!themeMetadataPath.isEmpty() || themeName.isEmpty());
|
||||
const QString cacheFileBase = cacheFile + QLatin1String("*.kcache");
|
||||
|
Loading…
Reference in New Issue
Block a user