Fixed delete and non-null pointer bug

This commit is contained in:
Eric Katzfey
2023-12-27 09:09:30 -08:00
parent f6318c4926
commit 564c37d696
+1
View File
@@ -1031,6 +1031,7 @@ GPS::run()
if ((_interface == GPSHelper::Interface::UART) && (_uart)) {
(void) _uart->close();
delete _uart;
_uart = nullptr;
#ifdef __PX4_LINUX