https://bugs.gentoo.org/936516 https://gitlab.gnome.org/GNOME/gnome-boxes/-/merge_requests/648 From 00183fd26a7b51905c179a427a38bfa18d9eb2d3 Mon Sep 17 00:00:00 2001 From: sid Date: Wed, 22 May 2024 19:32:06 +0100 Subject: [PATCH] libvirt-broker: Check when broker is not valid Related: #863 --- a/src/libvirt-broker.vala +++ b/src/libvirt-broker.vala @@ -24,9 +24,10 @@ public GVir.Connection get_connection (string name) { return broker.connections.get (name); } - public async LibvirtMachine add_domain (CollectionSource source, GVir.Connection connection, GVir.Domain domain) - throws GLib.Error { - return_val_if_fail (broker != null, null); + public async LibvirtMachine? add_domain (CollectionSource source, GVir.Connection connection, GVir.Domain domain) + throws GLib.Error { + if (broker == null) + return null; if (pending_domains.find (domain) != null) { // Already being added asychronously -- GitLab