From aae6975cb7e68448f78db0d9de48e23b9c2fb9eb Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 14 May 2013 21:33:42 -0500 Subject: [PATCH] execute_add_command(): Handle NULL config correctly --- src/update_image.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/update_image.c b/src/update_image.c index d7a289a3..317cca8a 100644 --- a/src/update_image.c +++ b/src/update_image.c @@ -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; -- 2.43.0