Skip to content
Snippets Groups Projects
Commit f214940c authored by Jürgen Doser's avatar Jürgen Doser
Browse files

Fix crash when pressing delete button in server browser and no server is selected.

A check for that was there, but was comparing an unsigned variable to
-1, which doesn't work.
parent 26a0efae
No related branches found
No related tags found
No related merge requests found
......@@ -1053,7 +1053,7 @@ bool GUIMainMenu::OnEvent(const SEvent& event)
}
case GUI_ID_SERVERLIST_DELETE: {
gui::IGUIListBox *serverlist = (gui::IGUIListBox*)getElementFromId(GUI_ID_SERVERLIST);
u16 selected = ((gui::IGUIListBox*)serverlist)->getSelected();
s32 selected = ((gui::IGUIListBox*)serverlist)->getSelected();
if (selected == -1) return true;
ServerList::deleteEntry(m_data->servers[selected]);
m_data->servers = ServerList::getLocal();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment