From 7212fb9caa15119c500edb3a074a5bc6b956605d Mon Sep 17 00:00:00 2001 From: Andrik45719 Date: Tue, 11 Nov 2025 18:00:08 +0200 Subject: [PATCH] Fix null pointer dereference in radio chip region check (#8613) --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index c65482292..8fec62953 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1401,7 +1401,7 @@ void setup() #endif // check if the radio chip matches the selected region - if ((config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && (!rIf->wideLora())) { + if ((config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && rIf && (!rIf->wideLora())) { LOG_WARN("LoRa chip does not support 2.4GHz. Revert to unset"); config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET; nodeDB->saveToDisk(SEGMENT_CONFIG);