summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Config/PathConfigPane.cpp
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-06-14 13:30:15 +0200
committerGitHub <noreply@github.com>2017-06-14 13:30:15 +0200
commit40a9e585a71a73a095005219a376ee0fb03b92d6 (patch)
tree9b69e094e37e8ddb5d7bc288618a20407d247e9c /Source/Core/DolphinWX/Config/PathConfigPane.cpp
parentc71cb9ac499ede2e2fb50dbea632f10cd55ef499 (diff)
parent2a349f8e493ed8bb35aab30229964421e2bf1cc6 (diff)
Merge pull request #5604 from sepalani/wx-rm-path
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)