From 401ab0da1fbbee8ba3a1526c7d1eb3ca2b9593d2 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Sat, 23 Mar 2024 20:38:34 +0000 Subject: [PATCH] JS: Fix badusb.quit() and serial.end() --- applications/system/js_app/modules/js_badusb.c | 1 + applications/system/js_app/modules/js_serial.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/applications/system/js_app/modules/js_badusb.c b/applications/system/js_app/modules/js_badusb.c index 349fde7ba2..a380141e84 100644 --- a/applications/system/js_app/modules/js_badusb.c +++ b/applications/system/js_app/modules/js_badusb.c @@ -81,6 +81,7 @@ static void js_badusb_quit_free(JsBadusbInst* badusb) { if(badusb->usb_if_prev) { furi_hal_hid_kb_release_all(); furi_check(furi_hal_usb_set_config(badusb->usb_if_prev, NULL)); + badusb->usb_if_prev = NULL; } if(badusb->hid_cfg) { free(badusb->hid_cfg); diff --git a/applications/system/js_app/modules/js_serial.c b/applications/system/js_app/modules/js_serial.c index 77257039ed..a7d1398956 100644 --- a/applications/system/js_app/modules/js_serial.c +++ b/applications/system/js_app/modules/js_serial.c @@ -115,6 +115,8 @@ static void js_serial_deinit(JsSerialInst* js_serial) { expansion_enable(furi_record_open(RECORD_EXPANSION)); furi_record_close(RECORD_EXPANSION); + + js_serial->setup_done = false; } }