Verify that the we get a non-nil subtree before consulting it.

Fixes #27919
This commit is contained in:
Matt Liggett 2016-06-23 08:39:02 -07:00
parent d7a8668606
commit 7a40584f66

View File

@ -98,6 +98,9 @@ func (cache *TreeCache) setSubCache(key string, subCache *TreeCache, path ...str
func (cache *TreeCache) getEntry(key string, path ...string) (interface{}, bool) {
childNode := cache.getSubCache(path...)
if childNode == nil {
return nil, false
}
val, ok := childNode.Entries[key]
return val, ok
}