mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix: bad_alloc if canvas element size is negative
This commit is contained in:
parent
3a999c6b19
commit
7c74eece99
1 changed files with 1 additions and 1 deletions
|
|
@ -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<int>(1, size.x), std::max<int>(1, size.y));
|
||||
texture->reload(*data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue