[gnome-builder] code-index: fix access to task pointer



commit 6edb22b999cbf86df3095ced23b308621a01e83d
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 21 13:18:54 2019 -0800

    code-index: fix access to task pointer
    
    This also fixes file-search from the global search as the task completes
    allowing the popover to display.

 src/plugins/code-index/ide-code-index-search-provider.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/code-index/ide-code-index-search-provider.c 
b/src/plugins/code-index/ide-code-index-search-provider.c
index 2efc86e3e..5e127c4e3 100644
--- a/src/plugins/code-index/ide-code-index-search-provider.c
+++ b/src/plugins/code-index/ide-code-index-search-provider.c
@@ -75,6 +75,9 @@ ide_code_index_search_provider_search_async (IdeSearchProvider   *provider,
   context = ide_object_get_context (IDE_OBJECT (self));
   g_assert (IDE_IS_CONTEXT (context));
 
+  task = ide_task_new (self, cancellable, callback, user_data);
+  ide_task_set_source_tag (task, ide_code_index_search_provider_search_async);
+
   if (!ide_context_has_project (context) ||
       !(addin = gbp_code_index_workbench_addin_from_context (context)))
     {
@@ -87,10 +90,6 @@ ide_code_index_search_provider_search_async (IdeSearchProvider   *provider,
 
   index = gbp_code_index_workbench_addin_get_index (addin);
 
-  task = ide_task_new (self, cancellable, callback, user_data);
-  ide_task_set_source_tag (task, ide_code_index_search_provider_search_async);
-  ide_task_set_priority (task, G_PRIORITY_LOW);
-
   if (index == NULL)
     ide_task_return_new_error (task,
                                G_IO_ERROR,


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