Setup the dimensions of GuiObject in the constructor, by using reflowLayout.

This properly initializes _x, _y, _w and _h, which might be used
uninitialized otherwise. This probably lead to a creash for _sev,
when drawing the tab widget, before GuiObject::reflowLayout had
been called. FYI GuiObject::reflowLayout is usually only called
on layout changes (i.e. resolution changes etc.), thus it might
not be called before drawing a newly created widget.

svn-id: r46947
This commit is contained in:
Johannes Schickel 2010-01-03 21:07:56 +00:00
parent eccf0cc429
commit 770b2f78d4

View File

@ -32,6 +32,7 @@ namespace GUI {
GuiObject::GuiObject(const Common::String &name) : _firstWidget(0) {
_name = name;
reflowLayout();
}
GuiObject::~GuiObject() {