summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-20 19:14:28 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-20 19:16:36 +0000
commit86a89a8c1de88f279b306ac8e3461773895aa7a2 (patch)
tree12d647765ec72aa1e75d7f9999a0cd82da53a31f /src
parent0a778d974f2dca2555711ef79e738cb0614b2a3f (diff)
win32: Check for damage before blitting
During the surface flush, we reduce any pending damage and then blit. If no damage had been accrued then the damage->region would be NULL leading to a segfault. Patch suggested by Szuromi Gábor. Reported-by: Szuromi Gábor <kukkerman@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47605 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/win32/cairo-win32-display-surface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c
index 43862aa38..9e18f8d4b 100644
--- a/src/win32/cairo-win32-display-surface.c
+++ b/src/win32/cairo-win32-display-surface.c
@@ -516,7 +516,7 @@ _cairo_win32_display_surface_flush (void *abstract_surface)
0, 0,
SRCCOPY))
status = _cairo_win32_print_gdi_error (__FUNCTION__);
- } else {
+ } else if (damage->region) {
int n = cairo_region_num_rectangles (damage->region), i;
for (i = 0; i < n; i++) {
cairo_rectangle_int_t rect;