aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/state/simple.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/state/simple.go')
-rw-r--r--internal/state/simple.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/state/simple.go b/internal/state/simple.go
index ad3e4726..1a26f6f7 100644
--- a/internal/state/simple.go
+++ b/internal/state/simple.go
@@ -176,6 +176,10 @@ func (b *simpleBackend) Save(state *State) error {
b.lock.Lock()
defer b.lock.Unlock()
+ if state.Config == nil {
+ return errors.New("state does not contain config")
+ }
+
statePath := b.filename(state.PID)
// create and open state data file