mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Fix crash when disabling expansion modules
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user