summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MCServer/profile_run.cmd8
1 files changed, 6 insertions, 2 deletions
diff --git a/MCServer/profile_run.cmd b/MCServer/profile_run.cmd
index 58efea64a..1ed47ac11 100644
--- a/MCServer/profile_run.cmd
+++ b/MCServer/profile_run.cmd
@@ -45,7 +45,7 @@ if %outputdir%n == n (
-::Create the output directory, if it didn't exist
+:: Create the output directory, if it didn't exist
mkdir %outputdir%
@@ -60,7 +60,7 @@ if errorlevel 1 goto haderror
:: Launch the application via the profiler
%pt%\vsperfcmd /launch:%app%
-if errorlevel 1 goto haderror
+if errorlevel 1 goto haderrorshutdown
:: Shut down the profiler (this command waits, until the application is terminated)
%pt%\vsperfcmd /shutdown
@@ -86,6 +86,10 @@ goto finished
+:haderrorshutdown
+echo An error was encountered, shutting down the profiler
+%pt%\vsperfcmd /shutdown
+
:haderror
echo An error was encountered
pause