From a961acbdb1d0873065be15bf15bc8d20a5954029 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 9 Jun 2011 12:58:05 +1000 Subject: [PATCH] Fix initialization bugs in d9d952d3c0475b1e7f7b8df2b062f85f24387aca --- src/declarative/qml/v8/qv8engine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/v8/qv8engine.cpp b/src/declarative/qml/v8/qv8engine.cpp index c7f05f0..0314402 100644 --- a/src/declarative/qml/v8/qv8engine.cpp +++ b/src/declarative/qml/v8/qv8engine.cpp @@ -658,6 +658,8 @@ void QV8Engine::releaseHandle(void *handle) struct QV8EngineRegistrationData { + QV8EngineRegistrationData() : extensionCount(0) {} + QMutex mutex; int extensionCount; }; @@ -676,7 +678,7 @@ int QV8Engine::registerExtension() void QV8Engine::setExtensionData(int index, Deletable *data) { if (m_extensionData.count() <= index) - m_extensionData.resize(index); + m_extensionData.resize(index + 1); if (m_extensionData.at(index)) delete m_extensionData.at(index); -- 2.7.4