wimlib_export_image(): error if src_wim == dest_wim
authorEric Biggers <ebiggers3@gmail.com>
Sat, 2 May 2015 22:40:06 +0000 (17:40 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 2 May 2015 23:13:41 +0000 (18:13 -0500)
src/export_image.c

index e88107a..8ad2d53 100644 (file)
@@ -128,7 +128,7 @@ wimlib_export_image(WIMStruct *src_wim,
                             WIMLIB_EXPORT_FLAG_WIMBOOT))
                return WIMLIB_ERR_INVALID_PARAM;
 
-       if (src_wim == NULL || dest_wim == NULL)
+       if (!src_wim || !dest_wim || src_wim == dest_wim)
                return WIMLIB_ERR_INVALID_PARAM;
 
        if (!wim_has_metadata(src_wim) || !wim_has_metadata(dest_wim))