diff --git a/libraries/AP_GPS/AP_GPS_MAV.cpp b/libraries/AP_GPS/AP_GPS_MAV.cpp index b1970170ca..11ec17ff3d 100644 --- a/libraries/AP_GPS/AP_GPS_MAV.cpp +++ b/libraries/AP_GPS/AP_GPS_MAV.cpp @@ -59,7 +59,7 @@ void AP_GPS_MAV::handle_msg(mavlink_message_t *msg) state.time_week_ms = packet.time_week_ms; state.status = (AP_GPS::GPS_Status)packet.fix_type; - Location loc; + Location loc = {}; loc.lat = packet.lat; loc.lng = packet.lon; if (have_alt) {