mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-23 21:34:35 +03:00
[FL-3844] Loader: fix crash on "locked via cli loader" (#3706)
This commit is contained in:
parent
70d2453bbc
commit
730026c87a
@ -428,13 +428,19 @@ static LoaderStatus loader_do_start_by_name(
|
|||||||
do {
|
do {
|
||||||
// check lock
|
// check lock
|
||||||
if(loader_do_is_locked(loader)) {
|
if(loader_do_is_locked(loader)) {
|
||||||
const char* current_thread_name =
|
if(loader->app.thread == (FuriThread*)LOADER_MAGIC_THREAD_VALUE) {
|
||||||
furi_thread_get_name(furi_thread_get_id(loader->app.thread));
|
status = loader_make_status_error(
|
||||||
status = loader_make_status_error(
|
LoaderStatusErrorAppStarted, error_message, "Loader is locked");
|
||||||
LoaderStatusErrorAppStarted,
|
} else {
|
||||||
error_message,
|
const char* current_thread_name =
|
||||||
"Loader is locked, please close the \"%s\" first",
|
furi_thread_get_name(furi_thread_get_id(loader->app.thread));
|
||||||
current_thread_name);
|
|
||||||
|
status = loader_make_status_error(
|
||||||
|
LoaderStatusErrorAppStarted,
|
||||||
|
error_message,
|
||||||
|
"Loader is locked, please close the \"%s\" first",
|
||||||
|
current_thread_name);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user