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 74a1f0b commit 73a97e0
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 73a97e0

Please sign in to comment.