diff --git a/es-core/src/components/TextComponent.cpp b/es-core/src/components/TextComponent.cpp index 9087e7dc4..0f4dc1f95 100644 --- a/es-core/src/components/TextComponent.cpp +++ b/es-core/src/components/TextComponent.cpp @@ -472,7 +472,7 @@ void TextComponent::onTextChanged() float offsetY {0.0f}; if (mHorizontalScrolling) { - if (lineHeight > mSize.y) + if (lineHeight > mSize.y && mSize.y != 0.0f) offsetY = (mSize.y - lineHeight) / 2.0f; mTextCache = std::shared_ptr( font->buildTextCache(text, 0.0f, offsetY, mColor, mLineSpacing));