[gnome-builder] code-index: check for NULL code indexer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] code-index: check for NULL code indexer
- Date: Sat, 2 Sep 2017 06:17:58 +0000 (UTC)
commit 940c7fa8cf06dff23e6eed928358653f6f6d923b
Author: Christian Hergert <chergert redhat com>
Date: Fri Sep 1 23:13:26 2017 -0700
code-index: check for NULL code indexer
Fixes CID 175137
.../code-index/ide-code-index-symbol-resolver.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/plugins/code-index/ide-code-index-symbol-resolver.c
b/plugins/code-index/ide-code-index-symbol-resolver.c
index 9f6212b..03e3754 100644
--- a/plugins/code-index/ide-code-index-symbol-resolver.c
+++ b/plugins/code-index/ide-code-index-symbol-resolver.c
@@ -103,6 +103,17 @@ ide_code_index_symbol_resolver_lookup_symbol_async (IdeSymbolResolver *resolve
code_indexer = ide_code_index_service_get_code_indexer (service, file_name);
task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, ide_code_index_symbol_resolver_lookup_symbol_async);
+ g_task_set_priority (task, G_PRIORITY_LOW);
+
+ if (code_indexer == NULL)
+ {
+ g_task_return_new_error (task,
+ G_IO_ERROR,
+ G_IO_ERROR_NOT_SUPPORTED,
+ "Failed to lcoate code indexer");
+ return;
+ }
if (g_task_return_error_if_cancelled (task))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]