From: Debian Qt/KDE Maintainers Date: Sat, 23 Sep 2023 19:58:22 +0000 (+0100) Subject: fix appendChildNode() call X-Git-Tag: archive/raspbian/5.15.8+dfsg-3+rpi1+deb12u1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5b94c5133ba4dd358503ce313210b65053e1ad98;p=qtlocation-opensource-src.git fix appendChildNode() call Origin: upstream, https://code.qt.io/cgit/qt/qtlocation.git/commit/?id=6cb20a08b65c73b4 Last-Update: 2023-08-18 The QSGNode::appendChildNode() method checks that its parameter must not have a parent. Before this patch we always called appendChildNode() on a node that already had parent, which was always leading to ASSERT in a debug build. Seems that the right approach would be to call this method, if the node *does not* have a parent. Gbp-Pq: Name fix_appendChildNode_call.diff --- diff --git a/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp b/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp index a978573..11e1466 100644 --- a/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp +++ b/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp @@ -158,7 +158,7 @@ void QGeoMapObjectQSGSupport::updateMapObjects(QSGNode *root, QQuickWindow *wind if (!root) return; - if (m_mapObjectsRootNode && m_mapObjectsRootNode->parent()) + if (m_mapObjectsRootNode && !m_mapObjectsRootNode->parent()) root->appendChildNode(m_mapObjectsRootNode.get()); if (!m_mapObjectsRootNode) {