Skip to content

Commit

Permalink
conversion-gen: check for nil pkg in getManualConversionFunctions
Browse files Browse the repository at this point in the history
Kubernetes-commit: 58dd760c66a448ca1f26bb90a1a82707d2a7a252
  • Loading branch information
munnerz authored and k8s-publish-robot committed Nov 17, 2017
1 parent ca893af commit 792cc1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/conversion-gen/generators/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ type conversionFuncMap map[conversionPair]*types.Type

// Returns all manually-defined conversion functions in the package.
func getManualConversionFunctions(context *generator.Context, pkg *types.Package, manualMap conversionFuncMap) {
if pkg == nil {
glog.Warningf("Skipping nil package passed to getManualConversionFunctions")
return
}
glog.V(5).Infof("Scanning for conversion functions in %v", pkg.Name)

scopeName := types.Ref(conversionPackagePath, "Scope").Name
Expand Down

0 comments on commit 792cc1b

Please sign in to comment.