diff --git a/desktop_version/src/Vlogging.c b/desktop_version/src/Vlogging.c index 79041caf..a88b9616 100644 --- a/desktop_version/src/Vlogging.c +++ b/desktop_version/src/Vlogging.c @@ -181,8 +181,17 @@ void vlog_open_console(void) return; } - freopen("CON", "w", stdout); - freopen("CON", "w", stderr); + const FILE* handle = freopen("CON", "w", stdout); + if (handle == NULL) + { + vlog_error("Could not redirect STDOUT to console."); + } + + handle = freopen("CON", "w", stderr); + if (handle == NULL) + { + vlog_error("Could not redirect STDERR to console."); + } check_color_support(); }