Blob Blame History Raw
From 4ae91ff847a9d4c78dbe9eb882f3bba36f7493ef Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Mon, 24 Feb 2020 10:42:20 +0000
Subject: [PATCH 9/9] Guard against null changes introduced by previous commit

---
 src/compositor/compositor-xrender.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index dc7ac15f..4a05bc7a 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -645,7 +645,7 @@ shadow_picture_clip (Display          *xdisplay,
 
   visible_region = meta_window_get_frame_bounds (cw->window);
 
-  if (!visible_region)
+  if (visible_region == NULL)
     return;
 
   shadow_dx = -1 * (int) shadow_offsets_x [cw->shadow_type] - borders.invisible.left;
@@ -1153,9 +1153,13 @@ border_size (MetaCompWindow *cw)
     {
       visible_region = meta_window_get_frame_bounds (cw->window);
 
-      if (visible_region)
+      if (visible_region != NULL) {
         visible = cairo_region_to_xserver_region (xdisplay, visible_region);
+      }
+      else {
+        g_warning ("Visible region is null");
     }
+  }
 
   meta_error_trap_push (display);
   border = XFixesCreateRegionFromWindow (xdisplay, cw->id,
-- 
2.21.1