summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_font.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_font.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_font.cpp b/xfa/fxfa/parser/cxfa_font.cpp
index c78e926b27..694cb26147 100644
--- a/xfa/fxfa/parser/cxfa_font.cpp
+++ b/xfa/fxfa/parser/cxfa_font.cpp
@@ -124,9 +124,12 @@ bool CXFA_Font::IsItalic() {
}
void CXFA_Font::SetColor(FX_ARGB color) {
- JSObject()
- ->GetOrCreateProperty<CXFA_Fill>(0, XFA_Element::Fill)
- ->SetColor(color);
+ CXFA_Fill* node =
+ JSObject()->GetOrCreateProperty<CXFA_Fill>(0, XFA_Element::Fill);
+ if (!node)
+ return;
+
+ node->SetColor(color);
}
FX_ARGB CXFA_Font::GetColor() {