summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Src/NetWindow.cpp
diff options
context:
space:
mode:
authorsl1nk3.s <sl1nk3.s@gmail.com>2009-05-14 18:53:59 +0000
committersl1nk3.s <sl1nk3.s@gmail.com>2009-05-14 18:53:59 +0000
commit034e3c72a22601e2bfe2d43f72d2a16c8f2c6e96 (patch)
treee1f9ee3ca3d5fb406f11fb1f58dbdf98c1c18fc9 /Source/Core/DolphinWX/Src/NetWindow.cpp
parent6b9d56bc6beefd53276d3a5d0fb02563500d8d9b (diff)
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
Diffstat (limited to 'Source/Core/DolphinWX/Src/NetWindow.cpp')
-rw-r--r--Source/Core/DolphinWX/Src/NetWindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/Src/NetWindow.cpp b/Source/Core/DolphinWX/Src/NetWindow.cpp
index d49440f41c..49e1cf546e 100644
--- a/Source/Core/DolphinWX/Src/NetWindow.cpp
+++ b/Source/Core/DolphinWX/Src/NetWindow.cpp
@@ -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: