]> wimlib.net Git - wimlib/blobdiff - src/export_image.c
wimlib_export_image(): error if src_wim == dest_wim
[wimlib] / src / export_image.c
index e88107a96030f6cae0aa646d48bc5dc673361f99..8ad2d533644f86c0ba73ad5f3fd8f4105cbf740a 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))