From 92d3358db551ac9d98064219ec64404a74764ce2 Mon Sep 17 00:00:00 2001 From: glx Date: Mon, 31 Dec 2018 00:00:29 +0100 Subject: Fix: [Win32] don't mess with std[out|err|in] if we can't allocate a console --- src/os/windows/win32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/os') diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index d2540ac34..bb1a0a420 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -300,7 +300,7 @@ void CreateConsole() if (_has_console) return; _has_console = true; - AllocConsole(); + if (!AllocConsole()) return; hand = GetStdHandle(STD_OUTPUT_HANDLE); GetConsoleScreenBufferInfo(hand, &coninfo); -- cgit v1.2.3-54-g00ecf