diff --git a/src/widgets/label.cpp b/src/widgets/label.cpp index 519e772..d0c11a2 100644 --- a/src/widgets/label.cpp +++ b/src/widgets/label.cpp @@ -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)