AP_Scripting: set lua nullptr after delete

This commit is contained in:
Iampete1
2022-10-17 08:29:53 +11:00
committed by Andrew Tridgell
parent 1c5c1a566f
commit da0ee9a8cb
+1
View File
@@ -235,6 +235,7 @@ void AP_Scripting::thread(void) {
gcs().send_text(MAV_SEVERITY_CRITICAL, "Scripting: %s", "stopped");
}
delete lua;
lua = nullptr;
// clear allocated i2c devices
for (uint8_t i=0; i<SCRIPTING_MAX_NUM_I2C_DEVICE; i++) {