Fixed ISOProperties window crash. Please don't kill modals with Destroy() but with EndModal().
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2020 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ac80c04eab
commit
7bc798b7f1
|
@ -644,8 +644,7 @@ void CGameListCtrl::OnProperties(wxCommandEvent& WXUNUSED (event))
|
||||||
if (!iso)
|
if (!iso)
|
||||||
return;
|
return;
|
||||||
CISOProperties ISOProperties(iso->GetFileName(), this);
|
CISOProperties ISOProperties(iso->GetFileName(), this);
|
||||||
ISOProperties.ShowModal();
|
if(ISOProperties.ShowModal() == wxID_OK)
|
||||||
if (ISOProperties.bRefreshList)
|
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||||
GameListItem OpenISO_(fileName);
|
GameListItem OpenISO_(fileName);
|
||||||
|
|
||||||
bRefreshList = false;
|
bRefreshList = false;
|
||||||
|
|
||||||
CreateGUIControls();
|
CreateGUIControls();
|
||||||
|
|
||||||
GameIniFile = FULL_GAMECONFIG_DIR + (OpenISO->GetUniqueID()) + ".ini";
|
GameIniFile = FULL_GAMECONFIG_DIR + (OpenISO->GetUniqueID()) + ".ini";
|
||||||
|
@ -409,7 +410,7 @@ void CISOProperties::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||||
if (!SaveGameConfig())
|
if (!SaveGameConfig())
|
||||||
wxMessageBox(wxString::Format(_("Could not save %s"), GameIniFile.c_str()), _("Error"), wxOK|wxICON_ERROR, this);
|
wxMessageBox(wxString::Format(_("Could not save %s"), GameIniFile.c_str()), _("Error"), wxOK|wxICON_ERROR, this);
|
||||||
|
|
||||||
Destroy();
|
EndModal(bRefreshList ? wxID_OK : wxID_CANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CISOProperties::OnCloseClick(wxCommandEvent& WXUNUSED (event))
|
void CISOProperties::OnCloseClick(wxCommandEvent& WXUNUSED (event))
|
||||||
|
|
Loading…
Reference in New Issue