Fix crash in GPS module.
Fixes crash on exit (during property untie). Also potential run-time crash.
This commit is contained in:
parent
99ee9a1bbb
commit
d365689d5c
1 changed files with 1 additions and 1 deletions
|
@ -1158,7 +1158,7 @@ double GPS::getWP1Bearing() const
|
|||
|
||||
double GPS::getWP1MagBearing() const
|
||||
{
|
||||
if (!_dataValid) {
|
||||
if (!_dataValid || !_wayptController.get()) {
|
||||
return -9999.0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue