1
0
Fork 0

Fix a crash if startup fails before the navradio is inited.

This commit is contained in:
jmt 2010-04-26 16:04:41 +00:00 committed by Tim Moore
parent 3419b28919
commit 1222e9b094

View file

@ -129,8 +129,13 @@ FGNavRadio::FGNavRadio(SGPropertyNode *node) :
// Destructor
FGNavRadio::~FGNavRadio()
{
gps_course_node->removeChangeListener(this);
nav_slaved_to_gps_node->removeChangeListener(this);
if (gps_course_node) {
gps_course_node->removeChangeListener(this);
}
if (nav_slaved_to_gps_node) {
nav_slaved_to_gps_node->removeChangeListener(this);
}
delete term_tbl;
delete low_tbl;