mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
conversion-gen: check for nil pkg in getManualConversionFunctions
This commit is contained in:
parent
52492e683f
commit
58dd760c66
@ -145,6 +145,10 @@ type conversionFuncMap map[conversionPair]*types.Type
|
|||||||
|
|
||||||
// Returns all manually-defined conversion functions in the package.
|
// Returns all manually-defined conversion functions in the package.
|
||||||
func getManualConversionFunctions(context *generator.Context, pkg *types.Package, manualMap conversionFuncMap) {
|
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)
|
glog.V(5).Infof("Scanning for conversion functions in %v", pkg.Name)
|
||||||
|
|
||||||
scopeName := types.Ref(conversionPackagePath, "Scope").Name
|
scopeName := types.Ref(conversionPackagePath, "Scope").Name
|
||||||
|
Loading…
Reference in New Issue
Block a user