Fixed Issue 1711 (a bug that prevents some games from booting)

Thanks to chuvit's help

Added safety check for CFrame::Update

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4759 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2009-12-31 16:25:12 +00:00
parent d4a1b97ac9
commit 40f4dd30c2
6 changed files with 190 additions and 150 deletions

View File

@ -309,6 +309,8 @@ CFrame::CFrame(wxFrame* parent,
#endif
{
m_bControlsCreated = false;
if (ShowLogWindow) SConfig::GetInstance().m_InterfaceLogWindow = true;
// Give it a console early to show potential messages from this onward
@ -461,6 +463,7 @@ CFrame::CFrame(wxFrame* parent,
// ----------
// Update controls
m_bControlsCreated = true;
UpdateGUI();
//if we are ever going back to optional iso caching:
@ -477,6 +480,8 @@ CFrame::CFrame(wxFrame* parent,
// Destructor
CFrame::~CFrame()
{
m_bControlsCreated = false;
cdio_free_device_list(drives);
/* The statbar sample has this so I add this to, but I guess timer will be deleted after
this anyway */

View File

@ -195,6 +195,7 @@ class CFrame : public wxFrame
bool m_bTabSplit;
bool m_bNoDocking;
bool m_bModalDialogOpen;
bool m_bControlsCreated;
char **drives;

View File

@ -915,6 +915,9 @@ void CFrame::OnFrameSkip(wxCommandEvent& event)
// Update the enabled/disabled status
void CFrame::UpdateGUI()
{
if (!m_bControlsCreated)
return;
// Save status
bool Initialized = Core::isRunning();
bool Running = Core::GetState() == Core::CORE_RUN;