diff --git a/src/graphics/ui/elements/Canvas.cpp b/src/graphics/ui/elements/Canvas.cpp index b24066ed..4fbc2b78 100644 --- a/src/graphics/ui/elements/Canvas.cpp +++ b/src/graphics/ui/elements/Canvas.cpp @@ -22,6 +22,6 @@ void gui::Canvas::draw(const DrawContext& pctx, const Assets& assets) { void gui::Canvas::setSize(const glm::vec2& size) { UINode::setSize(size); - data->extend(size.x, size.y); + data->extend(std::max(1, size.x), std::max(1, size.y)); texture->reload(*data); }