[gnome-boxes/always-set-device-sound-model] vm-configurator: Default to ich9 sound model




commit ec5f8ed9382f09c8fc4ae131d25ea1c412fbb1f1
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Nov 3 12:28:42 2020 +0100

    vm-configurator: Default to ich9 sound model
    
    These days users can set which OS they are installing in case
    libosinfo can't detect a given ISO. This way, it is very rare
    when an user will perform an installation in which we can't figure
    what's a adequate sound device model for it. And for those corner
    cases, it is safe to assume that ich9 would likely work. If not,
    the device sound model can be changed manually in the configuration.
    
    This fixes issue #618, in which we were returning nothing when the
    method signature had a (non-null) return type specified.
    
    Fixes #618

 src/vm-configurator.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index f2a50bb8..f0c340b5 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -468,7 +468,7 @@ else if (osinfo_name == "sb16")
             libvirt_name = "sb16";
 
         var model = get_enum_value (libvirt_name, typeof (DomainSoundModel));
-        return_if_fail (model != -1);
+        return_val_if_fail (model != -1, (DomainSoundModel) DomainSoundModel.ICH9);
         return (DomainSoundModel) model;
     }
 


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