Skip to content

Commit

Permalink
fix nil pointer dereference on follow/xls (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrnin authored Nov 12, 2020
1 parent 119a0b9 commit 6dc3948
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion follow.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ func (follows Follows) toXLS() ([]byte, Jerror) {
row.AddCell().Value = fmt.Sprintf("%s", f.EtablissementSummary.Siret)
row.AddCell().Value = fmt.Sprintf("%s", *f.EtablissementSummary.CodeDepartement)
row.AddCell().Value = fmt.Sprintf("%s", *f.EtablissementSummary.RaisonSociale)
row.AddCell().Value = fmt.Sprintf("%f", *f.EtablissementSummary.Effectif)
if f.EtablissementSummary.Effectif != nil {
row.AddCell().Value = fmt.Sprintf("%f", *f.EtablissementSummary.Effectif)
} else {
row.AddCell().Value = ""
}
row.AddCell().Value = fmt.Sprintf("%s", *f.EtablissementSummary.CodeActivite)
row.AddCell().Value = fmt.Sprintf("%s", *f.EtablissementSummary.LibelleActivite)
row.AddCell().Value = fmt.Sprintf("%s", *coalescepString(f.EtablissementSummary.Alert, &EmptyString))
Expand Down

0 comments on commit 6dc3948

Please sign in to comment.