Commit d853e280 authored by David Redondo's avatar David Redondo 🏎
Browse files

Fix crashes relating to PageDialog

There was a crash when we tried to access an invalid FaceLoader in data().
So unset the pagedata when the dialog is closed.
BUG:432147
parent dffc95af
......@@ -82,7 +82,9 @@ void FacesModel::setPageData(PageDataObject *pageData)
return;
}
beginResetModel();
disconnect(m_pageData, &PageDataObject::dirtyChanged, this, nullptr);
if (m_pageData) {
disconnect(m_pageData, &PageDataObject::dirtyChanged, this, nullptr);
}
m_faceLoaders.clear();
m_pageData = pageData;
Q_EMIT pageDataChanged();
......
......@@ -55,6 +55,7 @@ Dialog {
onClosed: {
actionsFace = "dummy" //see above
pageData = null
}
contentItem: Rectangle {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment