Warning, not error, on missing image name
authorEric Biggers <ebiggers3@gmail.com>
Fri, 18 May 2012 02:02:47 +0000 (21:02 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 18 May 2012 02:02:47 +0000 (21:02 -0500)
src/xml.c

index 12bf1a8..03b0b70 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -395,9 +395,15 @@ static int xml_read_image_info(xmlNode *image_node,
                        return ret;
        }
        if (!image_info->name) {
-               ERROR("Image with index %"PRIu64" has no name\n", 
+               WARNING("Image with index %"PRIu64" has no name\n", 
                                        image_info->index);
-               return WIMLIB_ERR_XML;
+               image_info->name = MALLOC(1);
+               if (!image_info->name) {
+                       ERROR("Out of memory!\n");
+                       return WIMLIB_ERR_NOMEM;
+               }
+               image_info->name[0] = '\0';
+               return 0;
        }
        
        return 0;