summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorbaby.lueshi <baby.lueshi@gmail.com>2011-05-03 17:15:38 +0000
committerbaby.lueshi <baby.lueshi@gmail.com>2011-05-03 17:15:38 +0000
commit7144162f0fcf3f452751311e0bcf244ee8cfbfeb (patch)
tree28e3f46209d513e9777382111a37c69a59a487e9 /Source/Core
parent06013852711c18f7b8ce31b6b6bbe0162abe7c33 (diff)
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
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/OnFrame.cpp8
1 files 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);
}
}