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

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



---
 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


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