summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2014-01-10 06:26:57 -0500
committerFlorian Müllner <fmuellner@gnome.org>2014-04-10 15:03:19 +0200
commit7943cf50d480e5841cf7012557ac094f4c5489c5 (patch)
treeff239e25bcc6cf89fdaff255a518386b2746135c
parent489ad9e9781aeb7efa4f0d9f3ef8855b27715e1c (diff)
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
-rw-r--r--src/compositor/meta-window-actor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 12ff76c4..ed196472 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -2229,7 +2229,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);
}