fix potential null pointer
This commit is contained in:
parent
de2bcda3db
commit
71f9e33f2f
@ -142,7 +142,7 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan, uint16_t pack
|
||||
control_sensors_present |= (1<<2); // compass present
|
||||
}
|
||||
control_sensors_present |= (1<<3); // absolute pressure sensor present
|
||||
if (g_gps->fix) {
|
||||
if (g_gps != NULL && g_gps->fix) {
|
||||
control_sensors_present |= (1<<5); // GPS present
|
||||
}
|
||||
control_sensors_present |= (1<<10); // 3D angular rate control
|
||||
|
Loading…
Reference in New Issue
Block a user