[gnome-online-accounts/gnome-3-8] alarm: The global default main context is always the same



commit 5cbed5062f292a69fe1a514425ced1bd19589cbc
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Nov 8 18:36:46 2013 +0100

    alarm: The global default main context is always the same
    
    Fixes: https://bugzilla.gnome.org/711696

 src/goaidentity/goaalarm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/goaidentity/goaalarm.c b/src/goaidentity/goaalarm.c
index 112cb00..e51df73 100644
--- a/src/goaidentity/goaalarm.c
+++ b/src/goaidentity/goaalarm.c
@@ -644,8 +644,8 @@ goa_alarm_set_time (GoaAlarm *self, GDateTime *time, GCancellable *cancellable)
 
   self->priv->time = time;
 
-  g_clear_pointer (&self->priv->context, (GDestroyNotify) g_main_context_unref);
-  self->priv->context = g_main_context_ref (g_main_context_default ());
+  if (self->priv->context == NULL)
+    self->priv->context = g_main_context_ref (g_main_context_default ());
 
   schedule_wakeups (self);
 


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