[gnome-boxes] Don't react to domain deletion event trigered by us



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]