Fixed some crashes in netplay, so it actually works :p

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3233 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s 2009-05-14 18:53:59 +00:00
commit 034e3c72a2
7 changed files with 85 additions and 52 deletions

View file

@ -43,7 +43,7 @@ NetPlay::NetPlay(wxWindow* parent, std::string GamePaths, std::string GameNames)
m_selectedGame = 'a'; m_hostaddr = 'a';
m_games = GameNames; m_paths = GamePaths;
m_isHosting = 2; m_ready = m_clients_ready = false;
m_loopframe = m_frame = 0;
m_loopframe = m_frame = m_NetModel = m_numClients = 0;
DrawGUI();
}
@ -498,7 +498,8 @@ void GameListPopup::OnButtons(wxCommandEvent& event)
switch (event.GetId())
{
case wxID_OK:
m_netParent->ChangeSelectedGame(std::string(m_GameList_str[m_GameList->GetSelection()].mb_str()));
if (m_GameList->GetSelection() != wxNOT_FOUND)
m_netParent->ChangeSelectedGame(std::string(m_GameList_str[m_GameList->GetSelection()].mb_str()));
Destroy();
break;
case wxID_CANCEL: