From 564c37d69630b198cc57eda1ac4548ca800c5ed8 Mon Sep 17 00:00:00 2001 From: Eric Katzfey Date: Wed, 26 Jul 2023 14:15:44 -0700 Subject: [PATCH] Fixed delete and non-null pointer bug --- src/drivers/gps/gps.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp index ae92000bfc..431a871f04 100644 --- a/src/drivers/gps/gps.cpp +++ b/src/drivers/gps/gps.cpp @@ -1031,6 +1031,7 @@ GPS::run() if ((_interface == GPSHelper::Interface::UART) && (_uart)) { (void) _uart->close(); delete _uart; + _uart = nullptr; #ifdef __PX4_LINUX