- if (ctx->progress_func) {
- int msg;
- if (extract_flags & WIMLIB_EXTRACT_FLAG_IMAGEMODE)
- msg = WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_BEGIN;
- else
- msg = WIMLIB_PROGRESS_MSG_EXTRACT_TREE_BEGIN;
- (*ctx->progress_func)(msg, &ctx->progress);
- }
+ ret = extract_progress(ctx,
+ ((extract_flags & WIMLIB_EXTRACT_FLAG_IMAGEMODE) ?
+ WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_BEGIN :
+ WIMLIB_PROGRESS_MSG_EXTRACT_TREE_BEGIN));
+ if (ret)
+ goto out_cleanup;