[gnome-builder] plugins/host: only remove noop runtime if we created it



commit 5177c2c41aa9952d503c9702e10db57982d1dc7d
Author: Christian Hergert <chergert redhat com>
Date:   Wed Sep 28 21:19:11 2022 -0700

    plugins/host: only remove noop runtime if we created it

 src/plugins/host/gbp-host-runtime-provider.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/host/gbp-host-runtime-provider.c b/src/plugins/host/gbp-host-runtime-provider.c
index cb33d71aa..80d9ebadc 100644
--- a/src/plugins/host/gbp-host-runtime-provider.c
+++ b/src/plugins/host/gbp-host-runtime-provider.c
@@ -90,8 +90,11 @@ gbp_host_runtime_provider_unload (IdeRuntimeProvider *provider,
   ide_runtime_manager_remove (runtime_manager, IDE_RUNTIME (self->host));
   ide_clear_and_destroy_object (&self->host);
 
-  ide_runtime_manager_remove (runtime_manager, IDE_RUNTIME (self->noop));
-  ide_clear_and_destroy_object (&self->noop);
+  if (self->noop != NULL)
+    {
+      ide_runtime_manager_remove (runtime_manager, IDE_RUNTIME (self->noop));
+      ide_clear_and_destroy_object (&self->noop);
+    }
 
   IDE_EXIT;
 }


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