[gnome-boxes] machine: Load correct screenshot for shutdown machine



commit aa6e2038b5d196e014acb8ee29a9a84b0c8044a9
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Apr 13 15:34:26 2015 +0100

    machine: Load correct screenshot for shutdown machine
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746804

 src/machine.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index c464e0b..4159eab 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -221,7 +221,9 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
 
     protected void load_screenshot () {
         try {
-            var screenshot = new Gdk.Pixbuf.from_file (get_screenshot_filename ());
+            var screenshot = (state != MachineState.STOPPED && state != MachineState.FORCE_STOPPED) ?
+                             new Gdk.Pixbuf.from_file (get_screenshot_filename ()) :
+                             null;
             set_screenshot (screenshot, false);
         } catch (GLib.Error error) {
         }


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