[metacity/gnome-3-18] compositor: don't crash when xregion is None
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/gnome-3-18] compositor: don't crash when xregion is None
- Date: Sun, 17 Apr 2016 15:10:29 +0000 (UTC)
commit c8ff09f0253cd17925bb3937971f8e6e4975db02
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Apr 17 17:57:43 2016 +0300
compositor: don't crash when xregion is None
src/compositor/compositor-xrender.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index cbf7211..61ee1be 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -624,6 +624,9 @@ xserver_region_to_cairo_region (Display *xdisplay,
int i;
cairo_region_t *region;
+ if (xregion == None)
+ return NULL;
+
xrects = XFixesFetchRegion (xdisplay, xregion, &nrects);
if (xrects == NULL)
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]