[vlc-commits] Win32: check AllocConsole() return value

Jean-Baptiste Kempf git at videolan.org
Tue Jan 22 13:45:21 CET 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jan 22 11:40:47 2013 +0100| [c8ec909155eaf0559132032b816d604486448f7d] | committer: Jean-Baptiste Kempf

Win32: check AllocConsole() return value

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c8ec909155eaf0559132032b816d604486448f7d
---

 src/config/help.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/config/help.c b/src/config/help.c
index 15a5153..d347cb8 100644
--- a/src/config/help.c
+++ b/src/config/help.c
@@ -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). */



More information about the vlc-commits mailing list