src/w32term.c (x_set_glyph_string_clipping): Don't pass uninitialized region to Combi...
authorJuanma Barranquero <lekktu@gmail.com>
Thu, 24 Mar 2011 02:30:26 +0000 (03:30 +0100)
committerJuanma Barranquero <lekktu@gmail.com>
Thu, 24 Mar 2011 02:30:26 +0000 (03:30 +0100)
src/ChangeLog
src/w32term.c

index b306ff7..ae40e46 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-24  Juanma Barranquero  <lekktu@gmail.com>
+
+       * w32term.c (x_set_glyph_string_clipping):
+       Don't pass uninitialized region to CombineRgn.
+
 2011-03-23  Juanma Barranquero  <lekktu@gmail.com>
 
        * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
index 56454fa..2252c93 100644 (file)
@@ -1068,16 +1068,12 @@ x_set_glyph_string_clipping (struct glyph_string *s)
     w32_set_clip_rectangle (s->hdc, r);
   else if (n > 1)
     {
-      HRGN full_clip, clip1, clip2;
-      clip1 = CreateRectRgnIndirect (r);
-      clip2 = CreateRectRgnIndirect (r + 1);
-      if (CombineRgn (full_clip, clip1, clip2, RGN_OR) != ERROR)
-        {
-          SelectClipRgn (s->hdc, full_clip);
-        }
+      HRGN clip1 = CreateRectRgnIndirect (r);
+      HRGN clip2 = CreateRectRgnIndirect (r + 1);
+      if (CombineRgn (clip1, clip1, clip2, RGN_OR) != ERROR)
+        SelectClipRgn (s->hdc, clip1);
       DeleteObject (clip1);
       DeleteObject (clip2);
-      DeleteObject (full_clip);
     }
     s->num_clips = n;
 }