From b6bbdf619573fceebfb14a37d7ad0cc3177145d6 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Wed, 16 Jul 2014 18:59:49 -0400 Subject: [PATCH] - Call C_DeinitConsole in I_Quit so that we can be sure that Printf will work for as long as possible. Otherwise ZDoom will crash when ending a demo recording. --- src/d_main.cpp | 2 -- src/sdl/i_system.cpp | 2 ++ src/win32/i_system.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 29a12c9c29..2570e7a36d 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1987,8 +1987,6 @@ static void D_DoomInit() Args->CollectFiles("-playdemo", ".lmp"); Args->CollectFiles("-file", NULL); // anything left goes after -file - atterm (C_DeinitConsole); - gamestate = GS_STARTUP; SetLanguageIDs (); diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 88850d9fe1..9b3027a7d8 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -353,6 +353,8 @@ void I_Quit (void) if (demorecording) G_CheckDemoStatus(); + + C_DeinitConsole(); } diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index 4690c253d6..4248df2740 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -781,6 +781,8 @@ void I_Quit() { G_CheckDemoStatus(); } + + C_DeinitConsole(); }