Merge pull request #26049 from crosbymichael/match-panic
Check for non-nil container after match
This commit is contained in:
commit
054f681eb8
1 changed files with 3 additions and 1 deletions
|
@ -147,7 +147,9 @@ func (daemon *Daemon) filterByNameIDMatches(ctx *listContext) []*container.Conta
|
|||
|
||||
cntrs := make([]*container.Container, 0, len(matches))
|
||||
for id := range matches {
|
||||
cntrs = append(cntrs, daemon.containers.Get(id))
|
||||
if c := daemon.containers.Get(id); c != nil {
|
||||
cntrs = append(cntrs, c)
|
||||
}
|
||||
}
|
||||
|
||||
// Restore sort-order after filtering
|
||||
|
|
Loading…
Add table
Reference in a new issue