Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 097de783 authored by Liz Kammer's avatar Liz Kammer Committed by Gerrit Code Review
Browse files

Merge "Check whether value_variables are set"

parents e6056153 40ddfaae
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -541,12 +541,15 @@ func (s *valueVariable) initializeProperties(v reflect.Value, typ reflect.Type)
}

func (s *valueVariable) PropertiesToApply(config SoongConfig, values reflect.Value) (interface{}, error) {
	if !config.IsSet(s.variable) {
	if !config.IsSet(s.variable) || !values.IsValid() {
		return nil, nil
	}
	configValue := config.String(s.variable)

	propStruct := values.Elem().Elem()
	if !propStruct.IsValid() {
		return nil, nil
	}
	for i := 0; i < propStruct.NumField(); i++ {
		field := propStruct.Field(i)
		kind := field.Kind()