mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	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.
This commit is contained in:
		@@ -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
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user