diff --git a/es-core/src/components/TextComponent.cpp b/es-core/src/components/TextComponent.cpp index b202a78b5..f19820b52 100644 --- a/es-core/src/components/TextComponent.cpp +++ b/es-core/src/components/TextComponent.cpp @@ -641,7 +641,13 @@ void TextComponent::applyTheme(const std::shared_ptr& theme, } if (elem->has("container") && elem->get("container")) { - if (elem->has("containerType")) { + if (!elem->has("size") || (elem->has("size") && elem->get("size").x == 0.0f)) { + LOG(LogError) << "TextComponent: Invalid theme configuration, property " + "\"container\" for element \"" + << element.substr(5) + << "\" can't be used as a horizontal size has not been defined"; + } + else if (elem->has("containerType")) { const std::string& containerType {elem->get("containerType")}; if (containerType == "horizontal") { if (elem->has("containerScrollSpeed")) {