diff options
author | Florian Müllner <fmuellner@gnome.org> | 2014-01-10 06:26:57 -0500 |
---|---|---|
committer | Rui Matos <tiagomatos@gmail.com> | 2014-02-28 20:11:58 +0100 |
commit | 94f39a493ffe24013d38c47ef7659218e0f91de5 (patch) | |
tree | 4d6b6207b9a5fd012be85ef6e9fe901104300959 | |
parent | ddc171220a92b6a1ac8b73f7f256a32f3113a0cb (diff) | |
download | mutter-94f39a493ffe24013d38c47ef7659218e0f91de5.tar.gz |
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.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 cf62d998f..a26d342bc 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -1714,7 +1714,8 @@ build_and_scan_frame_mask (MetaWindowActor *self, } meta_shaped_texture_set_mask_texture (stex, mask_texture); - cogl_object_unref (mask_texture); + if (mask_texture) + cogl_object_unref (mask_texture); g_free (mask_data); } |