From b62bf432366228f4ab291cc2199670ba52742548 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 28 Jan 2015 14:12:25 +0100 Subject: [PATCH] Avoid deleting an engine whilst components from our engine are still in use Otherwise it can lead to crashes Reviewed-by: Martin G --- kcmkwin/kwindecoration/declarative-plugin/previewitem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewitem.cpp b/kcmkwin/kwindecoration/declarative-plugin/previewitem.cpp index ac981748d2..a77261a542 100644 --- a/kcmkwin/kwindecoration/declarative-plugin/previewitem.cpp +++ b/kcmkwin/kwindecoration/declarative-plugin/previewitem.cpp @@ -53,6 +53,7 @@ PreviewItem::PreviewItem(QQuickItem *parent) PreviewItem::~PreviewItem() { + m_decoration->deleteLater(); if (m_bridge){ m_bridge->unregisterPreviewItem(this); } @@ -74,7 +75,7 @@ void PreviewItem::createDecoration() if (m_bridge.isNull() || m_settings.isNull() || m_decoration) { return; } - m_decoration = m_bridge->createDecoration(this); + m_decoration = m_bridge->createDecoration(0); if (!m_decoration) { return; }