Commit 436a109a authored by k8s-merge-robot's avatar k8s-merge-robot Committed by GitHub

Merge pull request #27950 from mml/fed-nil-subtree

Automatic merge from submit-queue Verify that the we get a non-nil subtree before consulting it.
parents cfc4bc0a 7a40584f
...@@ -98,6 +98,9 @@ func (cache *TreeCache) setSubCache(key string, subCache *TreeCache, path ...str ...@@ -98,6 +98,9 @@ func (cache *TreeCache) setSubCache(key string, subCache *TreeCache, path ...str
func (cache *TreeCache) getEntry(key string, path ...string) (interface{}, bool) { func (cache *TreeCache) getEntry(key string, path ...string) (interface{}, bool) {
childNode := cache.getSubCache(path...) childNode := cache.getSubCache(path...)
if childNode == nil {
return nil, false
}
val, ok := childNode.Entries[key] val, ok := childNode.Entries[key]
return val, ok return val, ok
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment