mirror of
https://git.mills.io/saltyim/saltyim.git
synced 2024-06-30 02:31:08 +00:00
Fix possible nil map from State.Load()
This commit is contained in:
parent
7c149128b4
commit
37135ce6af
4
state.go
4
state.go
@ -77,5 +77,9 @@ func LoadState(r io.Reader) (*State, error) {
|
||||
return nil, fmt.Errorf("error reading state: %w", err)
|
||||
}
|
||||
|
||||
if state.Indicies == nil {
|
||||
state.Indicies = make(map[string]int64)
|
||||
}
|
||||
|
||||
return state, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user