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:
parent
63885cc5b3
commit
b62bf43236
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue