diff --git a/Source/Core/Core/Src/HW/DVDInterface.cpp b/Source/Core/Core/Src/HW/DVDInterface.cpp index 32dacb7566..3268ee61e6 100644 --- a/Source/Core/Core/Src/HW/DVDInterface.cpp +++ b/Source/Core/Core/Src/HW/DVDInterface.cpp @@ -289,7 +289,6 @@ void ChangeDiscCallback(u64 userdata, int cyclesLate) } else { - delete [] (char *) userdata; if (VolumeHandler::SetVolumeName(FileName)) { // Save the new ISO file name diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index 5d455d16aa..54052ea4e0 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -198,6 +198,7 @@ class CFrame : public wxFrame bool m_bNoDocking; bool m_bModalDialogOpen; bool m_bControlsCreated; + char newDiscpath[2048]; wxMessageDialog *m_StopDlg; char **drives; diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 0880d9da9e..231a7e9fbb 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -556,12 +556,8 @@ void CFrame::DoOpen(bool Boot) } else { - if (!fileChosen) - path = wxT(""); - // temp is deleted by changediscCallback - char * temp = new char[strlen(path.mb_str())]; - strncpy(temp, path.mb_str(), strlen(path.mb_str())); - DVDInterface::ChangeDisc(temp); + strncpy(newDiscpath, path.mb_str(), strlen(path.mb_str())+1); + DVDInterface::ChangeDisc(newDiscpath); } } diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index c83468ccd5..5f3bb9cead 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -367,13 +367,13 @@ bool DolphinApp::OnInit() if (selectPadPlugin && padPluginFilename != wxEmptyString) { int k; - for(k=0;k<4;k++) + for(k=0;k