summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/app.cpp')
-rw-r--r--fpdfsdk/javascript/app.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index 80c952d6ca..6562d1b598 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -75,7 +75,8 @@ GlobalTimer::GlobalTimer(app* pObj,
m_pFormFillEnv(pFormFillEnv) {
CFX_SystemHandler* pHandler = m_pFormFillEnv->GetSysHandler();
m_nTimerID = pHandler->SetTimer(dwElapse, Trigger);
- (*GetGlobalTimerMap())[m_nTimerID] = this;
+ if (m_nTimerID)
+ (*GetGlobalTimerMap())[m_nTimerID] = this;
}
GlobalTimer::~GlobalTimer() {