wineconsole: Make sure that console process is not attached to another console.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-08-17 15:08:11 +02:00 committed by Alexandre Julliard
parent 2a62242747
commit ca30fa5cb4
1 changed files with 3 additions and 0 deletions

View File

@ -853,6 +853,9 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, INT nCmdSh
int ret = 1;
struct wc_init wci;
/* make sure we're not connected to inherited console */
FreeConsole();
if ((ret = WINECON_ParseOptions(lpCmdLine, &wci)) != 0)
{
printf_res(ret & 0xffff);