From e5a671be26a8e1b79b17319cbdc91ec75e710faa Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Wed, 22 Nov 2023 06:10:57 +0000 Subject: [PATCH] Fix subghz crash on exit with marauder connected --- applications/main/subghz/helpers/subghz_gps.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/applications/main/subghz/helpers/subghz_gps.c b/applications/main/subghz/helpers/subghz_gps.c index 88df096e1..2db8a65a4 100644 --- a/applications/main/subghz/helpers/subghz_gps.c +++ b/applications/main/subghz/helpers/subghz_gps.c @@ -138,9 +138,6 @@ SubGhzGPS* subghz_gps_init() { void subghz_gps_deinit(SubGhzGPS* subghz_gps) { furi_assert(subghz_gps); - furi_thread_free(subghz_gps->thread); - - free(subghz_gps); furi_hal_uart_set_irq_cb(UART_CH, NULL, NULL); if(UART_CH == FuriHalUartIdLPUART1) { @@ -148,6 +145,10 @@ void subghz_gps_deinit(SubGhzGPS* subghz_gps) { } else { furi_hal_console_enable(); } + + furi_thread_free(subghz_gps->thread); + + free(subghz_gps); } void subghz_gps_start(SubGhzGPS* subghz_gps) {