[metacity] compositor: don't crash when xregion is None
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] compositor: don't crash when xregion is None
- Date: Sun, 17 Apr 2016 15:13:28 +0000 (UTC)
commit 927faedbab4da30d75c514179c5f2190d42e71ff
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 e786731..a7d33e6 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -623,6 +623,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]