Commit 8bf10450 authored by Eric Tune's avatar Eric Tune

Fix nil pointer when validating in kubectl.

parent f0da47b2
...@@ -98,6 +98,10 @@ func (s *SwaggerSchema) ValidateObject(obj interface{}, apiVersion, fieldName, t ...@@ -98,6 +98,10 @@ func (s *SwaggerSchema) ValidateObject(obj interface{}, apiVersion, fieldName, t
glog.V(2).Infof("couldn't find properties for %s, skipping", key) glog.V(2).Infof("couldn't find properties for %s, skipping", key)
continue continue
} }
if details.Type == nil {
glog.V(2).Infof("nil details for %s, skipping", key)
continue
}
fieldType := *details.Type fieldType := *details.Type
if value == nil { if value == nil {
glog.V(2).Infof("Skipping nil field: %s", key) glog.V(2).Infof("Skipping nil field: %s", key)
......
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