[gnome-builder] ctags: be more tolerant of context destruction



commit f445d6cf21df2cfdbe7a7cf5c8bc334dcb8bd243
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jan 18 17:53:48 2019 -0800

    ctags: be more tolerant of context destruction

 src/plugins/ctags/ide-ctags-service.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/ctags/ide-ctags-service.c b/src/plugins/ctags/ide-ctags-service.c
index 9304727fa..b3799e684 100644
--- a/src/plugins/ctags/ide-ctags-service.c
+++ b/src/plugins/ctags/ide-ctags-service.c
@@ -142,15 +142,17 @@ hide_notification (IdeCtagsService *self)
 {
   g_assert (IDE_IS_MAIN_THREAD ());
   g_assert (IDE_IS_CTAGS_SERVICE (self));
-  g_assert (self->notif != NULL);
   g_assert (self->n_active > 0);
 
   self->n_active--;
 
   if (self->n_active == 0)
     {
-      ide_notification_withdraw_in_seconds (self->notif, 3);
-      g_clear_object (&self->notif);
+      if (self->notif != NULL)
+        {
+          ide_notification_withdraw_in_seconds (self->notif, 3);
+          g_clear_object (&self->notif);
+        }
     }
 }
 
@@ -924,6 +926,9 @@ ide_ctags_service_pause (IdeCtagsService *self)
 
   g_return_if_fail (IDE_IS_CTAGS_SERVICE (self));
 
+  if (ide_object_in_destruction (IDE_OBJECT (self)))
+    return;
+
   if (self->paused)
     return;
 
@@ -958,6 +963,9 @@ ide_ctags_service_unpause (IdeCtagsService *self)
 
   g_return_if_fail (IDE_IS_CTAGS_SERVICE (self));
 
+  if (ide_object_in_destruction (IDE_OBJECT (self)))
+    return;
+
   if (!self->paused)
     return;
 


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