[gnome-boxes] libvirt-machine-props: Handle missing min storage info



commit 5254e825261d083d83c4bbf4b96ee50cf4313a38
Author: Fabiano Fidêncio <fidencio redhat com>
Date:   Thu Aug 14 00:30:32 2014 +0200

    libvirt-machine-props: Handle missing min storage info
    
    Checking only for minimum resources being non-null is not enough, we
    need to also ensure min storage is known before using that information.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734749

 src/libvirt-machine-properties.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 98527d6..8e0dd2b 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -557,7 +557,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
             minimum_resources = OSDatabase.get_minimum_resources_for_os (os, architecture);
         }
 
-        if (minimum_resources != null) {
+        if (minimum_resources != null && minimum_resources.storage != -1) {
             return minimum_resources.storage;
         } else {
             var default_resources = OSDatabase.get_default_resources ();


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