summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cell.go b/cell.go
index ea4e1d0..892a906 100644
--- a/cell.go
+++ b/cell.go
@@ -522,13 +522,13 @@ func (f *File) GetCellRichText(sheet, cell string) (runs []RichTextRun, err erro
font := Font{}
font.Bold = v.RPr.B != nil
font.Italic = v.RPr.I != nil
- if nil != v.RPr.U {
+ if v.RPr.U != nil && v.RPr.U.Val != nil {
font.Underline = *v.RPr.U.Val
}
- if nil != v.RPr.RFont {
+ if v.RPr.RFont != nil && v.RPr.RFont.Val != nil {
font.Family = *v.RPr.RFont.Val
}
- if nil != v.RPr.Sz {
+ if v.RPr.Sz != nil && v.RPr.Sz.Val != nil {
font.Size = *v.RPr.Sz.Val
}
font.Strike = v.RPr.Strike != nil