File: fix_appendChildNode_call.diff

package info (click to toggle)
qtlocation-opensource-src 5.15.17%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 33,332 kB
  • sloc: cpp: 169,981; ansic: 3,910; xml: 2,791; java: 477; javascript: 190; sql: 52; makefile: 38
file content (22 lines) | stat: -rw-r--r-- 924 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: fix appendChildNode() call
 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.
Origin: upstream, https://code.qt.io/cgit/qt/qtlocation.git/commit/?id=6cb20a08b65c73b4
Last-Update: 2023-08-18

--- a/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp
+++ b/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp
@@ -158,7 +158,7 @@ void QGeoMapObjectQSGSupport::updateMapO
     if (!root)
         return;
 
-    if (m_mapObjectsRootNode && m_mapObjectsRootNode->parent())
+    if (m_mapObjectsRootNode && !m_mapObjectsRootNode->parent())
         root->appendChildNode(m_mapObjectsRootNode.get());
 
     if (!m_mapObjectsRootNode) {