[libvirt-designer][PATCH 3/3] add_disk_full: Only set error if !NULL

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

 



---
 libvirt-designer/libvirt-designer-domain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libvirt-designer/libvirt-designer-domain.c b/libvirt-designer/libvirt-designer-domain.c
index 0d441df..194fdf5 100644
--- a/libvirt-designer/libvirt-designer-domain.c
+++ b/libvirt-designer/libvirt-designer-domain.c
@@ -820,7 +820,7 @@ gvir_designer_domain_add_disk_full(GVirDesignerDomain *design,
         /* And fallback if fails */
         bus_str_list = gvir_designer_domain_get_supported_disk_bus_types(design);
         if (!bus_str_list) {
-            if (!*error)
+            if (error && !*error)
                 g_set_error(error, GVIR_DESIGNER_DOMAIN_ERROR, 0,
                             "Unable to find any disk bus type");
             goto error;
-- 
1.7.8.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]