]> git.sesse.net Git - vlc/commitdiff
Win32: check AllocConsole() return value
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 22 Jan 2013 10:40:47 +0000 (11:40 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 22 Jan 2013 13:02:23 +0000 (14:02 +0100)
src/config/help.c

index 15a515302e375ddd54eb8cf5bf44ae6228faf62a..d347cb8caa8c8456c75364ea9d702735f3620b2a 100644 (file)
@@ -808,7 +808,8 @@ static void ShowConsole( void )
 
     if( getenv( "PWD" ) ) return; /* Cygwin shell or Wine */
 
-    AllocConsole();
+    if( !AllocConsole() ) return;
+
     /* Use the ANSI code page (e.g. Windows-1252) as expected by the LibVLC
      * Unicode/locale subsystem. By default, we have the obsolecent OEM code
      * page (e.g. CP437 or CP850). */