changeset 34093:d554a3ac3039

(x_draw_vertical_border): Fix call to w32_fill_rect.
author Jason Rumney <jasonr@gnu.org>
date Fri, 01 Dec 2000 19:47:36 +0000
parents 6b258ad126d5
children 59adbaee3092
files src/w32term.c
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.c	Fri Dec 01 19:44:19 2000 +0000
+++ b/src/w32term.c	Fri Dec 01 19:47:36 2000 +0000
@@ -524,8 +524,15 @@
   RECT rect;
   HDC hdc = get_frame_dc (f);
 
-  GetClientRect (FRAME_W32_WINDOW (f), &rect);
-  w32_clear_rect (f, hdc, &rect);
+  /* Under certain conditions, this can be called at startup with
+     a console frame pointer before the GUI frame is created. An HDC
+     of 0 indicates this. */
+  if (hdc)
+    {
+      GetClientRect (FRAME_W32_WINDOW (f), &rect);
+      w32_clear_rect (f, hdc, &rect);
+    }
+
   release_frame_dc (f, hdc);
 }
 
@@ -640,7 +647,7 @@
       r.bottom -= 1;
 
       hdc = get_frame_dc (f);
-      w32_fill_rect (f, hdc, FRAME_FOREGROUND_PIXEL (f), r);
+      w32_fill_rect (f, hdc, FRAME_FOREGROUND_PIXEL (f), &r);
       release_frame_dc (f, hdc);
     }
 }