]> wimlib.net Git - wimlib/blobdiff - src/add_image.c
Win32 fixes
[wimlib] / src / add_image.c
index 32150a6316a7711b54ce34565f0400dc4ad7c0ff..7a8609fb7084c21656cb5ac2e54a76f356cae3e3 100644 (file)
@@ -1234,7 +1234,8 @@ static void canonicalize_targets(struct wimlib_capture_source *sources,
                 * backslashes to avoid confusing other parts of the library
                 * code. */
                zap_backslashes(sources->fs_source_path);
                 * backslashes to avoid confusing other parts of the library
                 * code. */
                zap_backslashes(sources->fs_source_path);
-               zap_backslashes(sources->wim_target_path);
+               if (sources->wim_target_path)
+                       zap_backslashes(sources->wim_target_path);
 #endif
                sources->wim_target_path =
                        (char*)canonicalize_target_path(sources->wim_target_path);
 #endif
                sources->wim_target_path =
                        (char*)canonicalize_target_path(sources->wim_target_path);