diff --git a/progress.go b/progress.go index 5a56eec..1219e90 100644 --- a/progress.go +++ b/progress.go @@ -64,6 +64,9 @@ // context. It's not possible to reuse instance after (*Progress).Wait // method has been called. func NewWithContext(ctx context.Context, options ...ContainerOption) *Progress { + if ctx == nil { + ctx = context.Background() + } ctx, cancel := context.WithCancel(ctx) s := &pState{ ctx: ctx,