diff options
Diffstat (limited to 'src/core/nodes')
-rw-r--r-- | src/core/nodes/qnode.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp index 15a2f5978..baf9525cb 100644 --- a/src/core/nodes/qnode.cpp +++ b/src/core/nodes/qnode.cpp @@ -134,6 +134,11 @@ void QNodePrivate::notifyDestructionChangesAndRemoveFromScene() { Q_Q(QNode); + // Ensure this node is not queued up for post-construction init + // to avoid crashing when the event loop spins. + if (m_scene && m_scene->postConstructorInit()) + m_scene->postConstructorInit()->removeNode(q); + // Tell the backend we are about to be destroyed if (m_hasBackendNode && m_scene && m_scene->engine()) QAspectEnginePrivate::get(m_scene->engine())->removeNode(q); |