Commit 1569a8b0 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #35322 from deads2k/controller-14-panic

Automatic merge from submit-queue prevent panic if resourceversion checked early Found panic while trying to use this in a separate API server.
parents bedb4f36 fd65bc8f
...@@ -207,7 +207,7 @@ func (s *sharedIndexInformer) LastSyncResourceVersion() string { ...@@ -207,7 +207,7 @@ func (s *sharedIndexInformer) LastSyncResourceVersion() string {
s.startedLock.Lock() s.startedLock.Lock()
defer s.startedLock.Unlock() defer s.startedLock.Unlock()
if s.controller == nil { if s.controller == nil || s.controller.reflector == nil {
return "" return ""
} }
return s.controller.reflector.LastSyncResourceVersion() return s.controller.reflector.LastSyncResourceVersion()
......
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