Fixed crash due to uninitialized variable in abstract top level container

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5795 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-08-28 01:02:13 +00:00
parent 363207e26c
commit 045317ccd1
3 changed files with 7 additions and 2 deletions

View File

@ -34,6 +34,12 @@ using namespace video;
using namespace io;
using namespace gui;
AbstractTopLevelContainer::AbstractTopLevelContainer()
{
m_first_widget = NULL;
m_last_widget = NULL;
}
void AbstractTopLevelContainer::addWidgetsRecursively(ptr_vector<Widget>& widgets, Widget* parent)
{
const unsigned short widgets_amount = widgets.size();

View File

@ -52,6 +52,7 @@ namespace GUIEngine
public:
AbstractTopLevelContainer();
virtual ~AbstractTopLevelContainer() {}
virtual int getWidth() = 0;

View File

@ -52,8 +52,6 @@ Screen::Screen(const char* file, bool pause_race)
m_throttle_FPS = true;
m_render_3d = false;
m_loaded = false;
m_first_widget = NULL;
m_last_widget = NULL;
m_pause_race = pause_race;
} // Screen