[mutter] MetaWindowActor: don't start any effect when no compositor is available



commit 35fcf4a4ae5e4c7259111def96aa19a2d5081fc4
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Fri Oct 20 02:52:04 2017 -0500

    MetaWindowActor: don't start any effect when no compositor is available
    
    There are cases when no compositor is available (yet) but a MetaWindow tries
    to start a simple effect using a compositor plugin which is not available.
    In that case we should just ignore any request and protect ourselves from
    crashes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789223

 src/compositor/meta-window-actor.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index de506aa..83f6570 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1076,6 +1076,9 @@ start_simple_effect (MetaWindowActor  *self,
   gint *counter = NULL;
   gboolean use_freeze_thaw = FALSE;
 
+  if (!compositor->plugin_mgr)
+    return FALSE;
+
   switch (event)
   {
   case META_PLUGIN_NONE:


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