[mutter/gnome-3-26] compositor: Keep reference to the screen on the MetaBackground



commit cc311dc8e68698a25c05d6020a13a8af44e14799
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Nov 6 20:35:13 2017 +0100

    compositor: Keep reference to the screen on the MetaBackground
    
    This is not a leak per se, but it seems too easy to make valgrind
    SIGSEGV due to MetaBackground disconnecting signals from an already
    destroyed MetaScreen when trying to SIGTERM gnome-shell. Keeping a
    reference fixes this.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789984

 src/compositor/meta-background.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
index 00d18f1..61dd120 100644
--- a/src/compositor/meta-background.c
+++ b/src/compositor/meta-background.c
@@ -163,7 +163,7 @@ set_screen (MetaBackground *self,
                                             self);
     }
 
-  priv->screen = screen;
+  g_set_object (&priv->screen, screen);
 
   if (priv->screen != NULL)
     {


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