From: Eric Biggers Date: Wed, 15 May 2013 02:33:42 +0000 (-0500) Subject: execute_add_command(): Handle NULL config correctly X-Git-Tag: v1.4.0~45 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=aae6975cb7e68448f78db0d9de48e23b9c2fb9eb;ds=sidebyside execute_add_command(): Handle NULL config correctly --- 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;