From 6926a50d701bb3686d3d4771b7ec7115c7ea5ee8 Mon Sep 17 00:00:00 2001 From: Jason P Date: Wed, 22 Oct 2025 15:44:37 -0500 Subject: [PATCH] Fix nullPointerRedundantCheck warning on ESP32 --- src/modules/CannedMessageModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index 32b8ed48d..ea29a52b0 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -1697,7 +1697,8 @@ void CannedMessageModule::drawDestinationSelectionScreen(OLEDDisplay *display, O strncpy(entryText, node->user.long_name, sizeof(entryText) - 1); entryText[sizeof(entryText) - 1] = '\0'; } - int availWidth = display->getWidth() - (graphics::isHighResolution ? 40 : 20) - ((node->is_favorite) ? 10 : 0); + int availWidth = + display->getWidth() - (graphics::isHighResolution ? 40 : 20) - ((node && node->is_favorite) ? 10 : 0); if (availWidth < 0) availWidth = 0;