From da1417b5ab71bacbb9ae5884492cd64adccb8096 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Mon, 22 Apr 2024 21:54:01 +0200 Subject: [PATCH] made recorder crash fix more robust --- misc_modules/recorder/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc_modules/recorder/src/main.cpp b/misc_modules/recorder/src/main.cpp index ac7038b9..19700376 100644 --- a/misc_modules/recorder/src/main.cpp +++ b/misc_modules/recorder/src/main.cpp @@ -476,9 +476,9 @@ private: sprintf(monStr, "%02d", ltm->tm_mon + 1); sprintf(yearStr, "%02d", ltm->tm_year + 1900); if (core::modComManager.getModuleName(name) == "radio") { - int mode; + int mode = -1; core::modComManager.callInterface(name, RADIO_IFACE_CMD_GET_MODE, NULL, &mode); - modeStr = radioModeToString[mode]; + if (mode >= 0) { modeStr = radioModeToString[mode]; }; } // Replace in template