X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fexport_image.c;h=8ad2d533644f86c0ba73ad5f3fd8f4105cbf740a;hb=ab63d9f11eae3b930f0f75fe0edb6b6df1cdb280;hp=e88107a96030f6cae0aa646d48bc5dc673361f99;hpb=be5acf31aa8292dcd4a2829492faefb0b200d28f;p=wimlib diff --git a/src/export_image.c b/src/export_image.c index e88107a9..8ad2d533 100644 --- a/src/export_image.c +++ b/src/export_image.c @@ -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))