Index: fpdfsdk/src/javascript/JS_Runtime.cpp |
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp |
index ac6e99d1cd632a52f5bcd9b5a5acf03c2b34d185..b195b429571a7336401bcb826cc467ae6c370ff7 100644 |
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp |
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp |
@@ -93,7 +93,7 @@ CJS_Runtime::~CJS_Runtime() { |
for (auto* obs : m_observers) |
obs->OnDestroyed(); |
- for (int i = 0; i < m_ContextArray.GetSize(); i++) |
+ for (int i = 0, sz = m_ContextArray.GetSize(); i < sz; i++) |
delete m_ContextArray.GetAt(i); |
m_ContextArray.RemoveAll(); |