[gnome-builder/wip/gtk4-port] plugins/meson: handle cases where introspection is not yet loaded



commit 2e1f69e76ce82d6634c02110c3eb2388d6db28d7
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jul 7 15:02:11 2022 -0700

    plugins/meson: handle cases where introspection is not yet loaded

 src/plugins/meson/gbp-meson-run-command-provider.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/meson/gbp-meson-run-command-provider.c 
b/src/plugins/meson/gbp-meson-run-command-provider.c
index e2ff74a78..d166bcef2 100644
--- a/src/plugins/meson/gbp-meson-run-command-provider.c
+++ b/src/plugins/meson/gbp-meson-run-command-provider.c
@@ -89,7 +89,8 @@ gbp_meson_run_command_provider_list_commands_async (IdeRunCommandProvider *provi
 
   if (!GBP_IS_MESON_BUILD_SYSTEM (build_system) ||
       pipeline == NULL ||
-      !(addin = ide_pipeline_addin_find_by_module_name (pipeline, "meson")))
+      !(addin = ide_pipeline_addin_find_by_module_name (pipeline, "meson")) ||
+      !(introspection = gbp_meson_pipeline_addin_get_introspection (GBP_MESON_PIPELINE_ADDIN (addin))))
     {
       ide_task_return_new_error (task,
                                  G_IO_ERROR,
@@ -98,7 +99,8 @@ gbp_meson_run_command_provider_list_commands_async (IdeRunCommandProvider *provi
       IDE_EXIT;
     }
 
-  introspection = gbp_meson_pipeline_addin_get_introspection (GBP_MESON_PIPELINE_ADDIN (addin));
+  g_assert (GBP_IS_MESON_INTROSPECTION (introspection));
+
   gbp_meson_introspection_list_run_commands_async (introspection,
                                                    cancellable,
                                                    gbp_meson_run_command_provider_list_run_commands_cb,


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