[gnome-builder] ctags: break out early if context is unavailable
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] ctags: break out early if context is unavailable
- Date: Fri, 11 Jan 2019 20:44:51 +0000 (UTC)
commit d785bff65bccdb896b8c64e88367ae40d95b76d7
Author: Christian Hergert <chergert redhat com>
Date: Fri Jan 11 12:16:46 2019 -0800
ctags: break out early if context is unavailable
src/plugins/ctags/ide-ctags-builder.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/ctags/ide-ctags-builder.c b/src/plugins/ctags/ide-ctags-builder.c
index 14e8a104b..d298159b6 100644
--- a/src/plugins/ctags/ide-ctags-builder.c
+++ b/src/plugins/ctags/ide-ctags-builder.c
@@ -319,7 +319,8 @@ ide_ctags_builder_build_async (IdeTagsBuilder *builder,
ide_task_set_source_tag (task, ide_ctags_builder_build_async);
ide_task_set_priority (task, G_PRIORITY_LOW + 200);
- if (ide_object_in_destruction (IDE_OBJECT (self)))
+ if (ide_object_in_destruction (IDE_OBJECT (self)) ||
+ !(context = ide_object_get_context (IDE_OBJECT (self))))
{
ide_task_return_new_error (task,
G_IO_ERROR,
@@ -342,7 +343,6 @@ ide_ctags_builder_build_async (IdeTagsBuilder *builder,
* reused even between configuration changes. Primarily, we want to avoid
* putting things in the source tree.
*/
- context = ide_object_get_context (IDE_OBJECT (self));
workdir = ide_context_ref_workdir (context);
relative_path = g_file_get_relative_path (workdir, directory_or_file);
destination_path = ide_context_cache_filename (context, "ctags", relative_path, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]