Avoid deleting an engine whilst components from our engine are still in use

Otherwise it can lead to crashes

Reviewed-by: Martin G
This commit is contained in:
David Edmundson 2015-01-28 14:12:25 +01:00
parent 63885cc5b3
commit b62bf43236

View file

@ -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;
}