Do not add invalid timers to the global map for CPWL_Timer.

Change-Id: Id1431ef0bd3fc0b4550b8929c05ec39e5f439818
Reviewed-on: https://pdfium-review.googlesource.com/c/48030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/pwl/cpwl_timer.cpp b/fpdfsdk/pwl/cpwl_timer.cpp
index 44fc32c..902a144 100644
--- a/fpdfsdk/pwl/cpwl_timer.cpp
+++ b/fpdfsdk/pwl/cpwl_timer.cpp
@@ -36,7 +36,8 @@
   KillPWLTimer();
 
   m_nTimerID = m_pSystemHandler->SetTimer(nElapse, TimerProc);
-  GetPWLTimeMap()[m_nTimerID] = this;
+  if (HasValidID())
+    GetPWLTimeMap()[m_nTimerID] = this;
   return m_nTimerID;
 }