Fix segfault on startup error on Android

This commit is contained in:
rubenwardy 2016-12-11 22:17:32 +00:00
parent 0fdf24d64a
commit 540071002e
2 changed files with 5 additions and 3 deletions

@ -177,8 +177,10 @@ void AutoHideButtonBar::init(ISimpleTextureSource* tsrc,
AutoHideButtonBar::~AutoHideButtonBar() AutoHideButtonBar::~AutoHideButtonBar()
{ {
if (m_starter.guibutton) {
m_starter.guibutton->setVisible(false); m_starter.guibutton->setVisible(false);
m_starter.guibutton->drop(); m_starter.guibutton->drop();
}
} }
void AutoHideButtonBar::addButton(touch_gui_button_id button_id, void AutoHideButtonBar::addButton(touch_gui_button_id button_id,

@ -75,7 +75,7 @@ struct button_info {
float repeatdelay; float repeatdelay;
irr::EKEY_CODE keycode; irr::EKEY_CODE keycode;
std::vector<int> ids; std::vector<int> ids;
IGUIButton* guibutton; IGUIButton* guibutton = NULL;
bool immediate_release; bool immediate_release;
}; };