delete framedata when ThemePrivate dies

This commit is contained in:
Marco Martin 2014-05-28 20:34:25 +02:00
parent 3fdf999ba0
commit 0c127f1ce5

View File

@ -112,7 +112,12 @@ ThemePrivate::ThemePrivate(QObject *parent)
ThemePrivate::~ThemePrivate()
{
FrameSvgPrivate::s_sharedFrames.remove(this);
if (FrameSvgPrivate::s_sharedFrames.contains(this)) {
foreach (FrameData *data, FrameSvgPrivate::s_sharedFrames[this].values()) {
delete data;
}
FrameSvgPrivate::s_sharedFrames.remove(this);
}
delete pixmapCache;
}