Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 4734e275d6644536aec3fe76d5c28a124db68b17 Mon Sep 17 00:00:00 2001
- From: Benjamin Franzke <benjaminfranzke@googlemail.com>
- Date: Fri, 2 Sep 2011 11:02:38 +0200
- Subject: [PATCH] clip: Fix processing-skip of rectangle-intersect
- Destroy region clip before (eventually) early
- skipping processing of intersection.
- Fixes segfault-on-focus with "zenity --entry".
- Bisected to:
- commit 52e3814824235ff236bc013f9adc85ed85eb8fb8
- Author: Chris Wilson <chris@chris-wilson.co.uk>
- Date: Sun Jul 24 17:31:39 2011 +0100
- clip: Skip processing of rectangle-intersection if it wholly subsumes the clip
- ---
- src/cairo-clip-boxes.c | 13 +++++++------
- 1 files changed, 7 insertions(+), 6 deletions(-)
- diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c
- index e18c2f8..ff72f8e 100644
- --- a/src/cairo-clip-boxes.c
- +++ b/src/cairo-clip-boxes.c
- @@ -166,6 +166,13 @@ _cairo_clip_intersect_rectangle_box (cairo_clip_t *clip,
- return _cairo_clip_set_all_clipped (clip);
- }
- + if (clip->region) {
- + cairo_region_destroy (clip->region);
- + clip->region = NULL;
- + }
- +
- + clip->is_region = FALSE;
- +
- if (clip->num_boxes == 0) {
- clip->boxes = &clip->embedded_box;
- clip->boxes[0] = *box;
- @@ -242,12 +249,6 @@ _cairo_clip_intersect_rectangle_box (cairo_clip_t *clip,
- return _cairo_clip_set_all_clipped (clip);
- }
- - if (clip->region) {
- - cairo_region_destroy (clip->region);
- - clip->region = NULL;
- - }
- -
- - clip->is_region = FALSE;
- return clip;
- }
- --
- 1.7.3.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement