[gnome-builder] code-index: check for cancellation up-front



commit 01fce1c02bdf012e526bc4d359613b6fe0fc8fae
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jan 18 13:05:50 2019 -0800

    code-index: check for cancellation up-front

 src/plugins/code-index/ide-code-index-symbol-resolver.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/plugins/code-index/ide-code-index-symbol-resolver.c 
b/src/plugins/code-index/ide-code-index-symbol-resolver.c
index ee877ab39..74f018db8 100644
--- a/src/plugins/code-index/ide-code-index-symbol-resolver.c
+++ b/src/plugins/code-index/ide-code-index-symbol-resolver.c
@@ -156,6 +156,9 @@ ide_code_index_symbol_resolver_lookup_symbol_async (IdeSymbolResolver   *resolve
   ide_task_set_source_tag (task, ide_code_index_symbol_resolver_lookup_symbol_async);
   ide_task_set_priority (task, G_PRIORITY_LOW);
 
+  if (ide_task_return_error_if_cancelled (task))
+    return;
+
   context = ide_object_get_context (IDE_OBJECT (self));
   g_assert (IDE_IS_CONTEXT (context));
 


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