From 9870027494b52e0daa54383a243a30a27ea42f5f Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 22 Jan 2018 11:10:11 +0100 Subject: [PATCH] [Plasma Theme] Guard against invalid KPluginInfo object BUG: 389152 Differential Revision: https://phabricator.kde.org/D9961 --- src/plasma/private/theme_p.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plasma/private/theme_p.cpp b/src/plasma/private/theme_p.cpp index 26a0bba7f..c66221455 100644 --- a/src/plasma/private/theme_p.cpp +++ b/src/plasma/private/theme_p.cpp @@ -192,7 +192,9 @@ bool ThemePrivate::useCache() if (!themeMetadataPath.isEmpty()) { // now we record the theme version, if we can const KPluginInfo pluginInfo(themeMetadataPath); - themeVersion = pluginInfo.version(); + if (pluginInfo.isValid()) { + themeVersion = pluginInfo.version(); + } if (!themeVersion.isEmpty()) { cacheFile += QLatin1String("_v") + themeVersion; currentCacheFileName = cacheFile + QLatin1String(".kcache");