[mutter] window-actor: Guard against %NULL frame mask



commit eb011636565808071603af92cf450e26fc17d0cf
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jan 10 06:26:57 2014 -0500

    window-actor: Guard against %NULL frame mask
    
    Creating a new cogl texture may fail, in which case the intent to
    free it will crash. While something is clearly wrong (insanely
    large window, oom, ...), crashing the WM is harsh and we should
    try to avoid it if at all possible, so carry on.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722266

 src/compositor/meta-window-actor.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index dcb1bd2..61a6e4e 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1968,7 +1968,8 @@ build_and_scan_frame_mask (MetaWindowActor       *self,
 
   meta_shaped_texture_set_mask_texture (META_SHAPED_TEXTURE (priv->actor),
                                         mask_texture);
-  cogl_object_unref (mask_texture);
+  if (mask_texture)
+    cogl_object_unref (mask_texture);
 
   g_free (mask_data);
 }


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