mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-02 08:19:19 +00:00
If more than 8 items have to be resized in a stacked theme layout, abort with an error (instead of silently trashing the stack)
svn-id: r35549
This commit is contained in:
parent
131cb5a05a
commit
751df013e1
@ -161,6 +161,7 @@ void ThemeLayoutStacked::reflowLayoutV() {
|
||||
_children[i]->setWidth((_w == -1 ? getParentW() : _w) - _padding.left - _padding.right);
|
||||
|
||||
if (_children[i]->getHeight() == -1) {
|
||||
assert(rescount < ARRAYSIZE(resize));
|
||||
resize[rescount++] = i;
|
||||
_children[i]->setHeight(0);
|
||||
}
|
||||
@ -209,6 +210,7 @@ void ThemeLayoutStacked::reflowLayoutH() {
|
||||
_children[i]->setHeight((_h == -1 ? getParentH() : _h) - _padding.top - _padding.bottom);
|
||||
|
||||
if (_children[i]->getWidth() == -1) {
|
||||
assert(rescount < ARRAYSIZE(resize));
|
||||
resize[rescount++] = i;
|
||||
_children[i]->setWidth(0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user