forked from Archive/PX4-Autopilot
Fixed delete and non-null pointer bug
This commit is contained in:
parent
81ab314a4c
commit
936d7c4f28
|
@ -1031,6 +1031,7 @@ GPS::run()
|
||||||
if ((_interface == GPSHelper::Interface::UART) && (_uart)) {
|
if ((_interface == GPSHelper::Interface::UART) && (_uart)) {
|
||||||
(void) _uart->close();
|
(void) _uart->close();
|
||||||
delete _uart;
|
delete _uart;
|
||||||
|
_uart = nullptr;
|
||||||
|
|
||||||
#ifdef __PX4_LINUX
|
#ifdef __PX4_LINUX
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue