| Index: fpdfsdk/src/javascript/Document.cpp
|
| diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
|
| index a8797095d81b10d4650cec165306371e54d107aa..91805b825e9e118de62e1e2551398c9d6c18bd19 100644
|
| --- a/fpdfsdk/src/javascript/Document.cpp
|
| +++ b/fpdfsdk/src/javascript/Document.cpp
|
| @@ -1367,8 +1367,12 @@ FX_BOOL Document::addIcon(IFXJS_Context* cc,
|
| sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
|
| return FALSE;
|
| }
|
| -
|
| CFX_WideString swIconName = params[0].ToCFXWideString();
|
| +
|
| + if (params[1].GetType() != VT_object) {
|
| + sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR);
|
| + return FALSE;
|
| + }
|
| JSFXObject pJSIcon = params[1].ToV8Object();
|
|
|
| CJS_Runtime* pRuntime = pContext->GetJSRuntime();
|
|
|