]> wimlib.net Git - wimlib/commitdiff
Fix NULL pointer dereference if no progress function supplied
authorEric Biggers <ebiggers3@gmail.com>
Sat, 24 Nov 2012 17:58:39 +0000 (11:58 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 24 Nov 2012 17:58:39 +0000 (11:58 -0600)
src/extract.c

index c42adac88daf88e7b7d7f8f903e7145954053aa4..bb99b24794b31cf86e9e4297b9e4a2b1df9fa420 100644 (file)
@@ -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);