From 770b2f78d4120074e544f9acc0c6449a9c032fa6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 3 Jan 2010 21:07:56 +0000 Subject: 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 --- gui/object.cpp | 1 + 1 file changed, 1 insertion(+) 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() { -- cgit v1.2.3