From e29b0d8b1fbc71df08c738d67b36cd2469d9ed48 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Wed, 27 Apr 2011 12:33:16 +0000 Subject: [PATCH] [win32k] -Fix a case when a window is created and we don't have a monitor created yet. (This can happen when we may attempt to use gui on demand) svn path=/trunk/; revision=51464 --- reactos/subsystems/win32/win32k/ntuser/window.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/window.c b/reactos/subsystems/win32/win32k/ntuser/window.c index 1b4c0b39461..8bb6b56277f 100644 --- a/reactos/subsystems/win32/win32k/ntuser/window.c +++ b/reactos/subsystems/win32/win32k/ntuser/window.c @@ -1555,7 +1555,15 @@ IntFixWindowCoordinates(CREATESTRUCTW* Cs, PWND ParentWindow, DWORD* dwShowMode) PRTL_USER_PROCESS_PARAMETERS ProcessParams; pMonitor = IntGetPrimaryMonitor(); - ASSERT(pMonitor); + + /* Check if we don't have a monitor attached yet */ + if(pMonitor == NULL) + { + Cs->x = Cs->y = 0; + Cs->cx = 800; + Cs->cy = 600; + return; + } ProcessParams = PsGetCurrentProcess()->Peb->ProcessParameters;