[gnome-boxes] Don't react to domain deletion event trigered by us
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Don't react to domain deletion event trigered by us
- Date: Thu, 15 Dec 2011 23:18:03 +0000 (UTC)
commit 6b7c0d8c259d0c2491099ecd9e565493986c7273
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Dec 15 23:54:05 2011 +0200
Don't react to domain deletion event trigered by us
This fixes two annoying warnings we get for deletion of VM from Boxes.
https://bugzilla.gnome.org/show_bug.cgi?id=666324
src/app.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 4957d58..6a1e9fe 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -96,6 +96,9 @@ private class Boxes.App: Boxes.UI {
connection.domain_removed.connect ((connection, domain) => {
var machine = domain.get_data<LibvirtMachine> ("machine");
+ if (machine == null)
+ return; // Looks like we removed the domain ourselves. Nothing to do then..
+
machine.delete (false);
collection.remove_item (machine);
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]