Canvas: fix possible crash with destroyed canvasses
This commit is contained in:
parent
8abe4622b9
commit
820a315cbe
@ -76,7 +76,7 @@ namespace simgear
|
||||
return PropertyBasedElementPtr();
|
||||
|
||||
BOOST_FOREACH(PropertyBasedElementPtr el, _elements)
|
||||
if( el->getProps()->getStringValue("name") == name )
|
||||
if( el && el->getProps()->getStringValue("name") == name )
|
||||
return el;
|
||||
|
||||
return PropertyBasedElementPtr();
|
||||
|
Loading…
Reference in New Issue
Block a user