[gnome-boxes] machine: Add a null check



commit fe4f075a1f4e3feb515c81b2c03c499c1317f32b
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Mar 16 16:03:27 2016 +0000

    machine: Add a null check
    
    The 'window' is already gone when display is hidden as part of Boxes
    shutdown so accessing it only crashes Boxes on exit.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761202

 src/machine.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index c1547bb..b7d7c91 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -197,7 +197,8 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
             show_id = _display.show.connect ((id) => { show_display (); });
 
             hide_id = _display.hide.connect ((id) => {
-                window.display_page.remove_display ();
+                if (window != null)
+                    window.display_page.remove_display ();
             });
 
             got_error_id = _display.got_error.connect ((message) => {


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