]> wimlib.net Git - wimlib/commitdiff
execute_add_command(): Handle NULL config correctly
authorEric Biggers <ebiggers3@gmail.com>
Wed, 15 May 2013 02:33:42 +0000 (21:33 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 15 May 2013 02:33:42 +0000 (21:33 -0500)
src/update_image.c

index d7a289a3a0dd5f6ffe253e0b5c37b776b87ce63a..317cca8a51d6c10cd99321cf33a78227f298b913 100644 (file)
@@ -243,8 +243,10 @@ execute_add_command(WIMStruct *wim,
                progress.scan.wim_target_path = wim_target_path;
                progress_func(WIMLIB_PROGRESS_MSG_SCAN_BEGIN, &progress);
        }
-       config->_prefix = fs_source_path;
-       config->_prefix_num_tchars = tstrlen(fs_source_path);
+       if (config) {
+               config->_prefix = fs_source_path;
+               config->_prefix_num_tchars = tstrlen(fs_source_path);
+       }
 
        if (wim_target_path[0] == T('\0'))
                add_flags |= WIMLIB_ADD_FLAG_ROOT;