diff options
author | Johannes Schickel | 2010-01-03 21:07:56 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-03 21:07:56 +0000 |
commit | 770b2f78d4120074e544f9acc0c6449a9c032fa6 (patch) | |
tree | c82a361b5ae82ef73569bb386daaea65b0b04ffd | |
parent | eccf0cc429a0d79ce81a0813305279b9377169f9 (diff) | |
download | scummvm-rg350-770b2f78d4120074e544f9acc0c6449a9c032fa6.tar.gz scummvm-rg350-770b2f78d4120074e544f9acc0c6449a9c032fa6.tar.bz2 scummvm-rg350-770b2f78d4120074e544f9acc0c6449a9c032fa6.zip |
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
-rw-r--r-- | gui/object.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gui/object.cpp b/gui/object.cpp index 19e21ea8eb..2267eb83b5 100644 --- a/gui/object.cpp +++ b/gui/object.cpp @@ -32,6 +32,7 @@ namespace GUI { GuiObject::GuiObject(const Common::String &name) : _firstWidget(0) { _name = name; + reflowLayout(); } GuiObject::~GuiObject() { |