Only initialize plugins if has been created

This commit is contained in:
zilmar 2015-03-18 20:49:15 +11:00
parent 9cec56fc89
commit 312516567e
1 changed files with 4 additions and 4 deletions

View File

@ -284,25 +284,25 @@ bool CPlugins::Reset ( CN64System * System )
CreatePlugins();
if (bGfxChange)
if (m_Gfx && bGfxChange)
{
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Gfx Initiate Starting");
if (!m_Gfx->Initiate(System,m_RenderWindow)) { return false; }
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Gfx Initiate Done");
}
if (bAudioChange)
if (m_Audio && bAudioChange)
{
WriteTrace(TraceDebug,__FUNCTION__ ": Audio Initiate Starting");
if (!m_Audio->Initiate(System,m_RenderWindow)) { return false; }
WriteTrace(TraceDebug,__FUNCTION__ ": Audio Initiate Done");
}
if (bContChange)
if (m_Control && bContChange)
{
WriteTrace(TraceDebug, __FUNCTION__ ": Control Initiate Starting");
if (!m_Control->Initiate(System,m_RenderWindow)) { return false; }
WriteTrace(TraceDebug, __FUNCTION__ ": Control Initiate Done");
}
if (bRspChange)
if (m_RSP && bRspChange)
{
WriteTrace(TraceRSP,__FUNCTION__ ": RSP Initiate Starting");
if (!m_RSP->Initiate(this,System)) { return false; }