[gtk+] Bug 589275 – [csw] Trying to destroy NULL regions



commit d84b575cd0a4cb411489007687086149c5c670cd
Author: Cody Russell <bratsche gnome org>
Date:   Tue Jul 21 11:44:25 2009 -0500

    Bug 589275 â?? [csw] Trying to destroy NULL regions
    
    gdk_window_input_shape_combine_mask() can accept NULL for the mask
    parameter, but it wasn't checking for NULL before passing the
    resulting GdkRegion to gdk_region_destroy().  Fixes #589275

 gdk/gdkwindow.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index ad8ac06..ab2c396 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -7392,7 +7392,7 @@ gdk_window_merge_child_shapes (GdkWindow *window)
 /**
  * gdk_window_input_shape_combine_mask:
  * @window: a #GdkWindow
- * @mask: shape mask
+ * @mask: shape mask, or %NULL
  * @x: X position of shape mask with respect to @window
  * @y: Y position of shape mask with respect to @window
  *
@@ -7437,7 +7437,8 @@ gdk_window_input_shape_combine_mask (GdkWindow *window,
 					 region,
 					 x, y);
 
-  gdk_region_destroy (region);
+  if (region != NULL)
+    gdk_region_destroy (region);
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]