[gnome-calendar] application: don't remove providers from screen when finalizing



commit 0ce04c0eeb44897218a7ea4d9d6443144c6a6872
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Feb 9 11:05:34 2017 -0200

    application: don't remove providers from screen when finalizing
    
    When finalizing the application, it is possible that the main window
    had already been destroyed and the Gtk+ CSS machinery to stop working.
    We currently try to remove the CSS providers from screen when finalizing,
    which (i) has no effect, and (ii) causes a segfault.
    
    Fix that by simply destroying the CSS providers, and not trying to
    remove them on finalize.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=773871

 src/gcal-application.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/src/gcal-application.c b/src/gcal-application.c
index 4ee4cae..52f2c3c 100644
--- a/src/gcal-application.c
+++ b/src/gcal-application.c
@@ -207,15 +207,8 @@ gcal_application_finalize (GObject *object)
   g_free (self->uuid);
   g_clear_pointer (&self->initial_date, g_free);
 
-  if (self->provider != NULL)
-    {
-      gtk_style_context_remove_provider_for_screen (gdk_screen_get_default (), GTK_STYLE_PROVIDER 
(self->colors_provider));
-
-      gtk_style_context_remove_provider_for_screen (gdk_screen_get_default (), GTK_STYLE_PROVIDER 
(self->provider));
-      g_clear_object (&(self->provider));
-    }
-
   g_clear_object (&self->colors_provider);
+  g_clear_object (&(self->provider));
   g_clear_object (&self->settings);
 
   g_clear_object (&self->manager);


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