Skip to content

Commit

Permalink
PathConfigPane: Prevent an invalid index assert
Browse files Browse the repository at this point in the history
  • Loading branch information
sepalani committed Jun 14, 2017
1 parent 9b8feb8 commit 2a349f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/Core/DolphinWX/Config/PathConfigPane.cpp
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinWX/Config/PathConfigPane.h
Expand Up @@ -22,6 +22,8 @@ class PathConfigPane final : public wxPanel
void LoadGUIValues();
void BindEvents();

void OnEnableIfCoreNotRunning(wxUpdateUIEvent& event);

void OnISOPathSelectionChanged(wxCommandEvent&);
void OnRecursiveISOCheckBoxChanged(wxCommandEvent&);
void OnAddISOPath(wxCommandEvent&);
Expand Down

0 comments on commit 2a349f8

Please sign in to comment.