[Plasma Theme] Guard against invalid KPluginInfo object
BUG: 389152 Differential Revision: https://phabricator.kde.org/D9961
This commit is contained in:
parent
5eece6769f
commit
9870027494
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user