Fixed nullptr crash
This commit is contained in:
@@ -28,7 +28,7 @@ void Label::redraw(std::string_view str, bool forceRedraw)
|
||||
!forceRedraw)
|
||||
return;
|
||||
|
||||
const auto renderedWidth = tft.drawString(str.data(), m_x, m_y);
|
||||
const auto renderedWidth = str.empty() ? 0 : tft.drawString(str.data(), m_x, m_y);
|
||||
const auto renderedHeight = tft.fontHeight();
|
||||
|
||||
if (renderedWidth < m_lastWidth)
|
||||
|
Reference in New Issue
Block a user