diff --git a/src/mesh/MeshService.cpp b/src/mesh/MeshService.cpp index c63e6d2d2..6bc8ccb50 100644 --- a/src/mesh/MeshService.cpp +++ b/src/mesh/MeshService.cpp @@ -196,8 +196,8 @@ void MeshService::handleToRadio(meshtastic_MeshPacket &p) p.rx_time = getValidTime(RTCQualityFromNet); // Record the time the packet arrived from the phone #if HAS_SCREEN - if (p.decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP && p.decoded.payload.size > 0 && p.to != NODENUM_BROADCAST && - p.to != 0) // DM only + if (screen && p.decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP && p.decoded.payload.size > 0 && + p.to != NODENUM_BROADCAST && p.to != 0) // DM only { perhapsDecode(&p); const StoredMessage &sm = messageStore.addFromPacket(p); diff --git a/src/modules/TextMessageModule.cpp b/src/modules/TextMessageModule.cpp index 76e063436..b05d5a52e 100644 --- a/src/modules/TextMessageModule.cpp +++ b/src/modules/TextMessageModule.cpp @@ -23,7 +23,7 @@ ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp devicestate.has_rx_text_message = true; #if HAS_SCREEN // Guard against running in MeshtasticUI - if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) { + if (screen && config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) { // Store in the central message history const StoredMessage &sm = messageStore.addFromPacket(mp);