Fixed crash when adding new players, see bug 3052858.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5775 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
5c0a18747e
commit
d6ab91d14d
@ -34,7 +34,9 @@ void TextBoxWidget::add()
|
||||
{
|
||||
rect<s32> widget_size = rect<s32>(m_x, m_y, m_x + m_w, m_y + m_h);
|
||||
|
||||
const stringw& text = getText();
|
||||
// Don't call TextBoxWidget::getText(), which assumes that the irrlicht
|
||||
// widget already exists.
|
||||
const stringw& text = Widget::getText();
|
||||
m_element = GUIEngine::getGUIEnv()->addEditBox(text.c_str(), widget_size,
|
||||
true /* border */, m_parent, getNewID());
|
||||
m_id = m_element->getID();
|
||||
|
Loading…
x
Reference in New Issue
Block a user