diff options
author | Juanma Barranquero <[email protected]> | 2011-03-24 03:30:26 +0100 |
---|---|---|
committer | Juanma Barranquero <[email protected]> | 2011-03-24 03:30:26 +0100 |
commit | 1149507c7fe8c24d93448eea2d0114746c580782 (patch) | |
tree | 77b2b20dbbc7959eb9b118419a66ee9d914bb61a /src/w32term.c | |
parent | cb5af48e50b716a2ee017e29a3e88edcf17e276f (diff) |
src/w32term.c (x_set_glyph_string_clipping): Don't pass uninitialized region to CombineRgn.
Diffstat (limited to 'src/w32term.c')
-rw-r--r-- | src/w32term.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/w32term.c b/src/w32term.c index 56454faddb..2252c93071 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -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; } |