fix crash during shutdown (#2859)

* fix null pointer access

* ptr initialize
This commit is contained in:
Manuel
2023-10-03 06:37:46 -05:00
committed by GitHub
co-authored by GitHub
parent 94c2ade272
commit f301e236eb
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ HardwareSerial *GPS::_serial_gps = &Serial1;
HardwareSerial *GPS::_serial_gps = NULL;
#endif
GPS *gps;
GPS *gps = nullptr;
/// Multiple GPS instances might use the same serial port (in sequence), but we can
/// only init that port once.