Skip to content

Commit

Permalink
Merge pull request #1140 from oiooj/pr-panic
Browse files Browse the repository at this point in the history
bugfix: fix daemon panic when meta snapshotter is nil
  • Loading branch information
allencloud authored Apr 17, 2018
2 parents 205fc5c + 19c68e9 commit 5f57ba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon/mgr/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,9 @@ func (mgr *ContainerManager) markStoppedAndRelease(c *Container, m *ctrd.Message
// delete the containerd container, the merged dir
// will also be deleted, so we should unset the
// container's MergedDir.
c.meta.Snapshotter.Data["MergedDir"] = ""
if c.meta.Snapshotter != nil && c.meta.Snapshotter.Data != nil {
c.meta.Snapshotter.Data["MergedDir"] = ""
}

// update meta
if err := c.Write(mgr.Store); err != nil {
Expand Down

0 comments on commit 5f57ba3

Please sign in to comment.