mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 04:53:08 +00:00
Fix crash when disabling expansion modules
This commit is contained in:
parent
3721a71eab
commit
ff28c23f64
1 changed files with 3 additions and 4 deletions
|
@ -107,15 +107,14 @@ static void
|
|||
|
||||
if(instance->state == ExpansionStateDisabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(instance->state == ExpansionStateRunning) {
|
||||
} else if(instance->state == ExpansionStateRunning) {
|
||||
expansion_worker_stop(instance->worker);
|
||||
expansion_worker_free(instance->worker);
|
||||
} else {
|
||||
furi_hal_serial_control_set_expansion_callback(instance->serial_id, NULL, NULL);
|
||||
}
|
||||
|
||||
instance->state = ExpansionStateDisabled;
|
||||
furi_hal_serial_control_set_expansion_callback(instance->serial_id, NULL, NULL);
|
||||
|
||||
FURI_LOG_D(TAG, "Detection disabled");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue