summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pwl')
-rw-r--r--fpdfsdk/pwl/cpwl_appstream.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/fpdfsdk/pwl/cpwl_appstream.cpp b/fpdfsdk/pwl/cpwl_appstream.cpp
index 0731398ae2..6e65831627 100644
--- a/fpdfsdk/pwl/cpwl_appstream.cpp
+++ b/fpdfsdk/pwl/cpwl_appstream.cpp
@@ -1184,9 +1184,13 @@ void CPWL_AppStream::SetAsPushButton() {
iColorType = da.GetColor(fc);
crText = CFX_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
}
- float fFontSize = 12.0f;
- if (da.HasFont())
- csNameTag = da.GetFont(&fFontSize);
+
+ float fFontSize;
+ Optional<ByteString> font = da.GetFont(&fFontSize);
+ if (font)
+ csNameTag = *font;
+ else
+ fFontSize = 12.0f;
WideString csWCaption;
WideString csNormalCaption;