mirror of https://github.com/ArduPilot/ardupilot
AP_Scripting: set lua nullptr after delete
This commit is contained in:
parent
5aef5473de
commit
56066eb470
|
@ -235,6 +235,7 @@ void AP_Scripting::thread(void) {
|
||||||
gcs().send_text(MAV_SEVERITY_CRITICAL, "Scripting: %s", "stopped");
|
gcs().send_text(MAV_SEVERITY_CRITICAL, "Scripting: %s", "stopped");
|
||||||
}
|
}
|
||||||
delete lua;
|
delete lua;
|
||||||
|
lua = nullptr;
|
||||||
|
|
||||||
// clear allocated i2c devices
|
// clear allocated i2c devices
|
||||||
for (uint8_t i=0; i<SCRIPTING_MAX_NUM_I2C_DEVICE; i++) {
|
for (uint8_t i=0; i<SCRIPTING_MAX_NUM_I2C_DEVICE; i++) {
|
||||||
|
|
Loading…
Reference in New Issue