AP_Scripting: set lua nullptr after delete

This commit is contained in:
Iampete1 2022-10-12 19:33:54 +01:00 committed by Randy Mackay
parent e986983b8a
commit 5d2f47a4bc
1 changed files with 1 additions and 0 deletions

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++) {