]> wimlib.net Git - wimlib/blobdiff - src/xml.c
split WIM apply, doc updates
[wimlib] / src / xml.c
index 2f67c9851fcc8fe331a3c425cadee3e3d8dba2c7..73ba38e41f14b3f0be756048641d57610936098e 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -1356,6 +1356,9 @@ WIMLIBAPI int wimlib_set_image_name(WIMStruct *w, int image, const char *name)
 
        DEBUG("Setting the name of image %d to %s", image, name);
 
+       if (!w)
+               return WIMLIB_ERR_INVALID_PARAM;
+
        if (!name || !*name) {
                ERROR("Must specify a non-empty string for the image name");
                return WIMLIB_ERR_INVALID_PARAM;
@@ -1393,6 +1396,9 @@ WIMLIBAPI int wimlib_set_image_descripton(WIMStruct *w, int image,
 
        DEBUG("Setting the description of image %d to %s", image, description);
 
+       if (!w)
+               return WIMLIB_ERR_INVALID_PARAM;
+
        if (image < 1 || image > w->hdr.image_count) {
                ERROR("%d is not a valid image", image);
                return WIMLIB_ERR_INVALID_IMAGE;