Fix null dereference

This commit is contained in:
Aaron L 2017-01-24 23:04:59 -08:00
parent d79f816cc1
commit c02a2f0c20

View file

@ -195,7 +195,9 @@ func (o *{{$txt.LocalTable.NameGo}}) Set{{$txt.Function.Name}}(exec boil.Executo
{{if .ToJoinTable -}}
remove{{$txt.Function.Name}}From{{$txt.Function.ForeignName}}Slice(o, related)
o.R.{{$txt.Function.Name}} = nil
if o.R != nil {
o.R.{{$txt.Function.Name}} = nil
}
{{else -}}
if o.R != nil {
for _, rel := range o.R.{{$txt.Function.Name}} {