Skip to content

Commit

Permalink
fix: check store == nil (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinsan-line authored Mar 23, 2021
1 parent 19d6caf commit d8e7cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store/cachemulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (cms Store) GetStore(key types.StoreKey) types.Store {
// GetKVStore returns an underlying KVStore by key.
func (cms Store) GetKVStore(key types.StoreKey) types.KVStore {
store := cms.stores[key]
if key == nil {
if store == nil {
panic(fmt.Sprintf("kv store with key %v has not been registered in stores", key))
}
return store.(types.KVStore)
Expand Down

0 comments on commit d8e7cfb

Please sign in to comment.