mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 09:08:16 +02:00
[win32] Fix initial clip region test
I misread the docs; GetClipBox's return value doesn't necessarily correspond to GetClipRgn's region type.
This commit is contained in:
parent
0e73763290
commit
182b022401
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue