From: Eric Biggers Date: Sat, 24 Nov 2012 17:58:39 +0000 (-0600) Subject: Fix NULL pointer dereference if no progress function supplied X-Git-Tag: v1.2.1~71 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=404cb3ab1194e80049443d1414c70648752f323d Fix NULL pointer dereference if no progress function supplied --- diff --git a/src/extract.c b/src/extract.c index c42adac8..bb99b247 100644 --- a/src/extract.c +++ b/src/extract.c @@ -549,8 +549,9 @@ static int apply_stream_list(struct list_head *stream_list, ret = ops->apply_dentry(dentry, args); if (ret != 0) goto out; - if (args->progress.extract.completed_bytes >= next_progress - && args->progress.extract.total_bytes != 0) + if (progress_func && + args->progress.extract.completed_bytes >= next_progress && + args->progress.extract.total_bytes != 0) { progress_func(WIMLIB_PROGRESS_MSG_EXTRACT_STREAMS, &args->progress);