Closed ajstarks closed 5 years ago
If the file cannot be found, AddUTF8Font panics instead of returning an error:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x525b45] goroutine 1 [running]: github.com/jung-kurt/gofpdf.(*Fpdf).addFont(0xc0000e2000, 0x5a46eb, 0x4, 0x0, 0x0, 0xc00007e060, 0x53, 0x1) /home/ajstarks/gowork/src/github.com/jung-kurt/gofpdf/fpdf.go:1603 +0x4c5 github.com/jung-kurt/gofpdf.(*Fpdf).AddUTF8Font(...) /home/ajstarks/gowork/src/github.com/jung-kurt/gofpdf/fpdf.go:1585 main.main() /home/ajstarks/work/utftest.go:26 +0x260 exit status 2
Thanks for the report, @ajstarks. I'll look into it.
Should be fixed with 641cda87ac3cf98cf58400cb3ce7513b6cc74295. Please reopen if this is still a problem.
confirmed fixed. thanks.
If the file cannot be found, AddUTF8Font panics instead of returning an error: