[WIN32K]
[reactos.git] / subsystems / win32 / win32k / ntuser / metric.c
index 4519ff8..b2bd665 100644 (file)
@@ -24,9 +24,19 @@ FASTCALL
 InitMetrics(VOID)
 {
     INT *piSysMet;
+    ULONG Width, Height;
 
-    ULONG Width = pPrimarySurface->gdiinfo.ulHorzRes;
-    ULONG Height = pPrimarySurface->gdiinfo.ulVertRes;
+    /* FIXME: HACK, due to missing PDEV on first init */
+    if (!pPrimarySurface)
+    {
+        Width = 640;
+        Height = 480;
+    }
+    else
+    {
+        Width = pPrimarySurface->gdiinfo.ulHorzRes;
+        Height = pPrimarySurface->gdiinfo.ulVertRes;
+    }
 
     piSysMet = gpsi->aiSysMet;