diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp index b99406034b..6cd154d8af 100644 --- a/src/drivers/gps/gps.cpp +++ b/src/drivers/gps/gps.cpp @@ -803,7 +803,8 @@ GPS::print_info() void GPS::publish() { - orb_publish_auto(ORB_ID(vehicle_gps_position), &_report_gps_pos_pub, &_report_gps_pos, &_gps_orb_instance, ORB_PRIO_DEFAULT); + orb_publish_auto(ORB_ID(vehicle_gps_position), &_report_gps_pos_pub, &_report_gps_pos, &_gps_orb_instance, + ORB_PRIO_DEFAULT); } /** @@ -900,6 +901,7 @@ stop() if (g_dev2 != nullptr) { delete g_dev2; } + g_dev2 = nullptr; px4_task_exit(0);