[Plasma Theme] Guard against invalid KPluginInfo object

BUG: 389152

Differential Revision: https://phabricator.kde.org/D9961
This commit is contained in:
Kai Uwe Broulik 2018-01-22 11:10:11 +01:00
parent 5eece6769f
commit 9870027494

View File

@ -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");