From a7cc36e711963ff47578945df15eb083b12c6a4d Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 14 Feb 2015 02:25:58 +0100 Subject: [PATCH] Movie: reintroduce a local variable --- Source/Core/Core/Movie.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp index 2121a85de3..09f0700e7b 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -467,10 +467,11 @@ bool BeginRecordingInput(int controllers) if (Core::IsRunningAndStarted()) { - if (File::Exists(File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav")) - File::Delete(File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav"); + const std::string save_path = File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav"; + if (File::Exists(save_path)) + File::Delete(save_path); - State::SaveAs(File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav"); + State::SaveAs(save_path); s_bRecordingFromSaveState = true; // This is only done here if starting from save state because otherwise we won't have the titleid. Otherwise it's set in WII_IPC_HLE_Device_es.cpp.