[mutter/gnome-3-26] compositor: Avoid a crash if the top window actor is finalized
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-26] compositor: Avoid a crash if the top window actor is finalized
- Date: Thu, 19 Oct 2017 16:38:55 +0000 (UTC)
commit 6eacf9a398da3db6152566abe5cc6b6e0afd9a3d
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Oct 17 17:17:55 2017 +0200
compositor: Avoid a crash if the top window actor is finalized
Since we're not holding a reference, the top window actor might be
finalized when we paint resulting in a use after free crash.
https://bugzilla.gnome.org/show_bug.cgi?id=788493
src/compositor/compositor.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index a75ac12..1d5b9ab 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -671,6 +671,9 @@ meta_compositor_remove_window (MetaCompositor *compositor,
if (compositor->unredirected_window == window)
set_unredirected_window (compositor, NULL);
+ if (compositor->top_window_actor == window_actor)
+ compositor->top_window_actor = NULL;
+
meta_window_actor_destroy (window_actor);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]