Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Add more docs about destruction of TextPropertiesDock

Dmitry Kazakovd0af2d3ee00d
diff --git a/plugins/dockers/textproperties/TextPropertiesDock.cpp b/plugins/dockers/textproperties/TextPropertiesDock.cpp
index ee2fdeb92c..20420fcf8a 100644
--- a/plugins/dockers/textproperties/TextPropertiesDock.cpp
+++ b/plugins/dockers/textproperties/TextPropertiesDock.cpp
@@ -117,7 +117,10 @@ TextPropertiesDock::TextPropertiesDock()
TextPropertiesDock::~TextPropertiesDock()
{
- // Prevent double free
+ /// Prevent accessing destroyed objects in QML engine
+ /// See:
+ /// * https://invent.kde.org/graphics/krita/-/commit/d8676f4e9cac1a8728e73fec3ff1df1763c713b7
+ /// * https://bugreports.qt.io/browse/QTBUG-81247
m_quickWidget->setParent(nullptr);
delete m_quickWidget;
}