[gnome-builder] foundry: short circuit if no project was loaded



commit bdcc85007d623beebc91b8a94d05e6cd9b0c5b4a
Author: Christian Hergert <chergert redhat com>
Date:   Wed May 29 19:21:32 2019 -0700

    foundry: short circuit if no project was loaded

 src/libide/foundry/ide-foundry-init.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/foundry/ide-foundry-init.c b/src/libide/foundry/ide-foundry-init.c
index cb23e0f30..be3d82042 100644
--- a/src/libide/foundry/ide-foundry-init.c
+++ b/src/libide/foundry/ide-foundry-init.c
@@ -200,7 +200,11 @@ _ide_foundry_unload_async (IdeContext          *context,
   task = ide_task_new (context, cancellable, callback, user_data);
   ide_task_set_source_tag (task, _ide_foundry_unload_async);
 
-  config_manager = ide_config_manager_from_context (context);
+  if (!(config_manager = ide_context_peek_child_typed (context, IDE_TYPE_CONFIG_MANAGER)))
+    {
+      ide_task_return_boolean (task, TRUE);
+      IDE_EXIT;
+    }
 
   ide_config_manager_save_async (config_manager,
                                  cancellable,


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