# HG changeset patch # User Daniel Atallah # Date 1191840934 0 # Node ID db66eb25c3898d627da8d3c5408040900ca1334a # Parent 6e6a870fd4f6fb8dd6720b05b68b0bd756d2d10c Fix allocating a console for and friends on Windows Vista. Refs #3392. diff -r 6e6a870fd4f6 -r db66eb25c389 pidgin/win32/winpidgin.c --- a/pidgin/win32/winpidgin.c Sun Oct 07 23:40:58 2007 +0000 +++ b/pidgin/win32/winpidgin.c Mon Oct 08 10:55:34 2007 +0000 @@ -545,7 +545,7 @@ if (strstr(lpszCmdLine, "-d") || strstr(lpszCmdLine, "-h") || strstr(lpszCmdLine, "-v")) { /* If stdout hasn't been redirected to a file, alloc a console * (_istty() doesn't work for stuff using the GUI subsystem) */ - if (_fileno(stdout) == -1) { + if (_fileno(stdout) == -1 || _fileno(stdout) == -2) { LPFNATTACHCONSOLE MyAttachConsole = NULL; if ((hmod = GetModuleHandle("kernel32.dll"))) { MyAttachConsole =