diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2016-12-19 10:41:40 +0100 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2016-12-19 10:45:33 +0100 |
| commit | adcfefecde2d3583e2df539c04d1a85e8dfe7821 (patch) | |
| tree | f1edffdb945759d957a523bd9eb0cc3ebafd393f /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | 989cdc09293130eaf6e99296c870b2edc4035f19 (diff) | |
DolphinWX: Fix booting from DVD
OnBootDrive used the "drives" member std::vector for drive paths, but
since PR #4363, this vector is not populated anymore, so we were
accessing it out of bounds.
Actually, drives was not needed in the first place, since we can
get the wxMenu from the event, and from there, get the label directly.
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 81db8f6d40..e50403f6fa 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -733,7 +733,8 @@ void CFrame::StartGame(const std::string& filename) void CFrame::OnBootDrive(wxCommandEvent& event) { - BootGame(drives[event.GetId() - IDM_DRIVE1]); + const auto* menu = static_cast<wxMenu*>(event.GetEventObject()); + BootGame(WxStrToStr(menu->GetLabelText(event.GetId()))); } void CFrame::OnRefresh(wxCommandEvent& WXUNUSED(event)) |
