summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Config/PathConfigPane.cpp
diff options
context:
space:
mode:
authorSepalani <sepalani@hotmail.fr>2017-06-12 22:51:21 +0100
committerSepalani <sepalani@hotmail.fr>2017-06-14 12:07:25 +0100
commit2a349f8e493ed8bb35aab30229964421e2bf1cc6 (patch)
tree1ca14dcbabdccc1005d33c6b3f38193e53d43c47 /Source/Core/DolphinWX/Config/PathConfigPane.cpp
parent9b8feb8e607658dbe6c9ad7d285a8962e7ec49b8 (diff)
PathConfigPane: Prevent an invalid index assert
Diffstat (limited to 'Source/Core/DolphinWX/Config/PathConfigPane.cpp')
-rw-r--r--Source/Core/DolphinWX/Config/PathConfigPane.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/Config/PathConfigPane.cpp b/Source/Core/DolphinWX/Config/PathConfigPane.cpp
index 866bc52956..5a0a1c1c13 100644
--- a/Source/Core/DolphinWX/Config/PathConfigPane.cpp
+++ b/Source/Core/DolphinWX/Config/PathConfigPane.cpp
@@ -144,7 +144,14 @@ void PathConfigPane::BindEvents()
m_wii_sdcard_filepicker->Bind(wxEVT_FILEPICKER_CHANGED, &PathConfigPane::OnSdCardPathChanged,
this);
- Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreNotRunning);
+ Bind(wxEVT_UPDATE_UI, &PathConfigPane::OnEnableIfCoreNotRunning, this);
+}
+
+void PathConfigPane::OnEnableIfCoreNotRunning(wxUpdateUIEvent& event)
+{
+ // Prevent the Remove button from being enabled via wxUpdateUIEvent
+ if (event.GetId() != m_remove_iso_path_button->GetId())
+ WxEventUtils::OnEnableIfCoreNotRunning(event);
}
void PathConfigPane::OnISOPathSelectionChanged(wxCommandEvent& event)