-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
This commit is contained in:
Giannis Adamopoulos 2011-04-27 12:33:16 +00:00
parent 7ed79f5ff3
commit e29b0d8b1f

View file

@ -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;