Fix nullPointerRedundantCheck warning on ESP32

This commit is contained in:
Jason P 2025-10-22 15:44:37 -05:00
parent ec04aa0a89
commit 6926a50d70

View File

@ -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;