Fix potential crash for undefined variable

This commit is contained in:
Jason P
2025-10-19 07:11:18 -05:00
parent 69f489ee70
commit a635ee3de2

View File

@@ -512,9 +512,9 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
senderBuf[sizeof(senderBuf) - 1] = '\0';
}
// If this is *our own* message, override sender to "Me"
// If this is *our own* message, override senderBuf to who the recipient was
bool mine = (m.sender == nodeDB->getNodeNum());
if (mine) {
if (mine && node_recipient && node_recipient->has_user) {
strcpy(senderBuf, node_recipient->user.long_name);
}