diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 9194b504e2..b97f68a3d1 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -88,6 +88,8 @@ void renderDot(QPainter *p, const QPointF &point, qreal diameter) OxygenClient::OxygenClient(KDecorationBridge *b, KDecorationFactory *f) : KCommonDecorationUnstable(b, f) , colorCacheInvalid_(true) + , shadowTiles_(NULL) + , glowTiles_(NULL) , helper_(*globalHelper) { qAddPostRoutine(oxkwincleanupBefore); @@ -95,6 +97,8 @@ OxygenClient::OxygenClient(KDecorationBridge *b, KDecorationFactory *f) OxygenClient::~OxygenClient() { + delete glowTiles_; + delete shadowTiles_; } QString OxygenClient::visibleName() const { @@ -562,6 +566,9 @@ TileSet *OxygenClient::shadowTiles(const QColor& color, const QColor& glow, qrea tileSet = new TileSet(shadow, size, size, 1, 1); glowTilesOption_ = opt; + if (glowTiles_) { + delete glowTiles_; + } glowTiles_ = tileSet; } else { //--------------------------------------------------------------- @@ -626,6 +633,9 @@ TileSet *OxygenClient::shadowTiles(const QColor& color, const QColor& glow, qrea tileSet = new TileSet(shadow, size, size, 1, 1); shadowTilesOption_ = opt; + if (shadowTiles_) { + delete shadowTiles_; + } shadowTiles_ = tileSet; } return tileSet;