Fix nil pointer when validating in kubectl.

This commit is contained in:
Eric Tune 2015-03-27 15:47:40 -07:00
parent f0da47b2dd
commit 8bf104503c

View File

@ -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)
continue
}
if details.Type == nil {
glog.V(2).Infof("nil details for %s, skipping", key)
continue
}
fieldType := *details.Type
if value == nil {
glog.V(2).Infof("Skipping nil field: %s", key)