summaryrefslogtreecommitdiff
path: root/libpod/runtime_pod.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime_pod.go')
-rw-r--r--libpod/runtime_pod.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go
index 19e32d1b0..b3dd7dabd 100644
--- a/libpod/runtime_pod.go
+++ b/libpod/runtime_pod.go
@@ -33,6 +33,14 @@ func (r *Runtime) RemovePod(ctx context.Context, p *Pod, removeCtrs, force bool)
return ErrRuntimeStopped
}
+ if !p.valid {
+ if ok, _ := r.state.HasPod(p.ID()); !ok {
+ // Pod probably already removed
+ // Or was never in the runtime to begin with
+ return nil
+ }
+ }
+
p.lock.Lock()
defer p.lock.Unlock()