diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-03-19 10:38:56 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-03-19 15:01:54 +0100 |
commit | 4ac08d3aa1882851d4a03aa1e53c47c6fb173958 (patch) | |
tree | ff27a306055f4eb6a1b57455cd15d3c7fe6eccf9 /libpod/container_internal.go | |
parent | b581fa1510f00864386859dd30f5392c6a521c0c (diff) | |
download | podman-4ac08d3aa1882851d4a03aa1e53c47c6fb173958.tar.gz podman-4ac08d3aa1882851d4a03aa1e53c47c6fb173958.tar.bz2 podman-4ac08d3aa1882851d4a03aa1e53c47c6fb173958.zip |
ps: fix segfault if the store is not initialized
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index ac2d65342..13e660dc3 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -51,6 +51,9 @@ func (c *Container) rootFsSize() (int64, error) { if c.config.Rootfs != "" { return 0, nil } + if c.runtime.store == nil { + return 0, nil + } container, err := c.runtime.store.Container(c.ID()) if err != nil { |