Skip to content
Snippets Groups Projects
Commit 5a73b1ca authored by Fabian Paus's avatar Fabian Paus
Browse files

ArViz: Prevent crash if layer with selected element is hidden

parent 9e281f1a
No related branches found
No related tags found
No related merge requests found
...@@ -507,6 +507,12 @@ namespace coin ...@@ -507,6 +507,12 @@ namespace coin
// Layer is currently visible // Layer is currently visible
if (!visible) if (!visible)
{ {
// If we hide a layer wit a selected element, Coin will crash during rendering
// So we check if the selected element is in the layer to be hidden
if (selectedElement && selectedElement->layer == id)
{
selection->deselectAll();
}
root->removeChild(childIndex); root->removeChild(childIndex);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment