[gnome-builder] ctags: check for object destruction when building



commit f7a6acf3b087e98743e095134ef63ce593ea78b7
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 21 12:28:27 2019 -0800

    ctags: check for object destruction when building
    
    We might be destroyed while building an index.

 src/plugins/ctags/ide-ctags-builder.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/plugins/ctags/ide-ctags-builder.c b/src/plugins/ctags/ide-ctags-builder.c
index d298159b6..31a0f101d 100644
--- a/src/plugins/ctags/ide-ctags-builder.c
+++ b/src/plugins/ctags/ide-ctags-builder.c
@@ -249,6 +249,10 @@ finish_subprocess:
       g_assert (G_IS_FILE (child));
       g_assert (G_IS_FILE (dest_child));
 
+      if (ide_object_in_destruction (IDE_OBJECT (self)) ||
+          g_cancellable_is_cancelled (cancellable))
+        return FALSE;
+
       if (ide_vcs_is_ignored (vcs, child, NULL))
         continue;
 


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