Codebase list golang-github-vbauerster-mpb / 3a6acfe
avoid panic, if nil bar passed Vladimir Bauer 7 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
6969 // Parked bar inherits priority of the runningBar, if no BarPriority
7070 // option is set. Parked bar will replace runningBar eventually.
7171 func BarParkTo(runningBar *Bar) BarOption {
72 if runningBar == nil {
73 return nil
74 }
7275 runningBar.dropOnComplete()
7376 return func(s *bState) {
7477 s.runningBar = runningBar