[Viewer] FeaturesInfoOverlay: Ensure node exists before getting its label

This fixes a "TypeError: Cannot read property 'label' of null" issue.
This commit is contained in:
Candice Bentéjac 2023-10-17 12:49:30 +02:00
parent 13b8266d14
commit d8709434a3

View file

@ -24,7 +24,7 @@ FloatingPane {
RowLayout {
// Node used to read features
Label {
text: _reconstruction ? _reconstruction.activeNodes.get("featureProvider").node.label : ""
text: _reconstruction && _reconstruction.activeNodes.get("featureProvider").node ? _reconstruction.activeNodes.get("featureProvider").node.label : ""
Layout.fillWidth: true
}
// Settings menu