summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir Vukicevic <vladimir@pobox.com>2008-01-26 10:57:20 -0800
committerVladimir Vukicevic <vladimir@sleet.vlad1.com>2008-01-27 15:26:00 -0800
commit182b02240192c03b1fae5367573962d527f8aad4 (patch)
treeb25c2a45cbf6c6537201e829100bd0169e6812d9 /src
parent0e737632905e61f4d76b6b2c4e5908d75a5cddda (diff)
[win32] Fix initial clip region test
I misread the docs; GetClipBox's return value doesn't necessarily correspond to GetClipRgn's region type.
Diffstat (limited to 'src')
-rw-r--r--src/cairo-win32-surface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index 69c64069..4017e2f4 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -2052,8 +2052,7 @@ _cairo_win32_save_initial_clip (HDC hdc, cairo_win32_surface_t *surface)
if (clipBoxType == COMPLEXREGION) {
surface->initial_clip_rgn = CreateRectRgn (0, 0, 0, 0);
- if (GetClipRgn (hdc, surface->initial_clip_rgn) == -1) {
- /* this should never happen */
+ if (GetClipRgn (hdc, surface->initial_clip_rgn) <= 0) {
DeleteObject(surface->initial_clip_rgn);
surface->initial_clip_rgn = NULL;
}