Commit 5e0aa799 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE] - added check if root node exists in activate()

parent 2c1f1683
......@@ -444,13 +444,17 @@ void WMTemplate::activate()
// OSG's requirements. Activating an inactive node is not the problem, as OSG does not traverse these nodes (and therefore could possibly
// produce issues), but deactivating an active node, which might be traversed at the same time, COULD cause problems. We'll see in the future
// whether this is problematic or not.
if ( m_active->get() )
{
m_rootNode->setNodeMask( 0xFFFFFFFF );
}
else
if ( m_rootNode ) // always ensure the root node exists
{
m_rootNode->setNodeMask( 0x0 );
if ( m_active->get() )
{
m_rootNode->setNodeMask( 0xFFFFFFFF );
}
else
{
m_rootNode->setNodeMask( 0x0 );
}
}
// Always call WModule's activate!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment