diff --git a/src/plasma/private/theme_p.cpp b/src/plasma/private/theme_p.cpp index b9c2a555e..1963f743d 100644 --- a/src/plasma/private/theme_p.cpp +++ b/src/plasma/private/theme_p.cpp @@ -115,7 +115,8 @@ ThemePrivate::ThemePrivate(QObject *parent) ThemePrivate::~ThemePrivate() { - if (FrameSvgPrivate::s_sharedFrames.contains(this)) { + saveSvgElementsCache(); + if (FrameSvgPrivate::s_sharedFrames.contains(this)) { foreach (FrameData *data, FrameSvgPrivate::s_sharedFrames[this].values()) { delete data; } @@ -633,7 +634,7 @@ QColor ThemePrivate::color(Theme::ColorRole role, Theme::ColorGroup group) const break; } } - + switch (role) { diff --git a/src/plasma/theme.cpp b/src/plasma/theme.cpp index ba4e9e8c0..18d4ed683 100644 --- a/src/plasma/theme.cpp +++ b/src/plasma/theme.cpp @@ -91,8 +91,6 @@ Theme::Theme(const QString &themeName, QObject *parent) Theme::~Theme() { - d->saveSvgElementsCache(); - if (d == ThemePrivate::globalTheme) { if (!ThemePrivate::globalThemeRefCount.deref()) { disconnect(ThemePrivate::globalTheme, 0, this, 0);