From 7144162f0fcf3f452751311e0bcf244ee8cfbfeb Mon Sep 17 00:00:00 2001 From: "baby.lueshi" Date: Tue, 3 May 2011 17:15:38 +0000 Subject: [PATCH] Fix bug with Dolphin crash on stop when recording. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7506 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/OnFrame.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/Src/OnFrame.cpp b/Source/Core/Core/Src/OnFrame.cpp index f4f67e926a..355e4612cb 100644 --- a/Source/Core/Core/Src/OnFrame.cpp +++ b/Source/Core/Core/Src/OnFrame.cpp @@ -448,7 +448,7 @@ void PlayController(SPADStatus *PadStatus, int controllerID) { // Correct playback is entirely dependent on the emulator polling the controllers // in the same order done during recording - if (!IsPlayingInput() || !IsUsingPad(controllerID)) + if (!IsPlayingInput() || !IsUsingPad(controllerID) || tmpInput == NULL) return; memset(PadStatus, 0, sizeof(SPADStatus)); @@ -538,7 +538,7 @@ bool PlayWiimote(int wiimote, u8 *data, s8 &size) { s8 count = 0; - if(!IsPlayingInput() || !IsUsingWiimote(wiimote)) + if(!IsPlayingInput() || !IsUsingWiimote(wiimote) || tmpInput == NULL) return false; if (inputOffset > tmpLength) @@ -578,11 +578,11 @@ void EndPlayInput(bool cont) } else { - delete tmpInput; - tmpInput = NULL; g_numPads = g_rerecords = 0; g_totalFrameCount = g_frameCounter = g_lagCounter = 0; g_playMode = MODE_NONE; + delete tmpInput; + tmpInput = NULL; Core::DisplayMessage("Movie End", 2000); } }