summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Field.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/Field.cpp')
-rw-r--r--fpdfsdk/javascript/Field.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 92b473b231..f37b3d486b 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -2835,7 +2835,8 @@ bool Field::buttonGetIcon(CJS_Runtime* pRuntime,
v8::Local<v8::Object> pObj =
pRuntime->NewFxDynamicObj(CJS_Icon::g_nObjDefnID);
- ASSERT(pObj.IsEmpty() == false);
+ if (pObj.IsEmpty())
+ return false;
CJS_Icon* pJS_Icon = static_cast<CJS_Icon*>(pRuntime->GetObjectPrivate(pObj));
vRet = CJS_Value(pRuntime, pJS_Icon);
@@ -2966,7 +2967,8 @@ bool Field::getArray(CJS_Runtime* pRuntime,
for (const auto& pStr : swSort) {
v8::Local<v8::Object> pObj =
pRuntime->NewFxDynamicObj(CJS_Field::g_nObjDefnID);
- ASSERT(!pObj.IsEmpty());
+ if (pObj.IsEmpty())
+ return false;
CJS_Field* pJSField =
static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pObj));