summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmexpression.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
index a74239ff82..c6b5814d6d 100644
--- a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
@@ -60,7 +60,7 @@ bool CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << L"(\n";
}
javascript << L"function ";
- if (m_wsName.GetAt(0) == L'!') {
+ if (!m_wsName.IsEmpty() && m_wsName[0] == L'!') {
CFX_WideString tempName =
EXCLAMATION_IN_IDENTIFIER + m_wsName.Right(m_wsName.GetLength() - 1);
javascript << tempName;