summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/expr/qevaluationcache.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-26 11:36:42 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-26 11:36:42 (GMT)
commit6661f5c2222c145d854e225076195b37672637d2 (patch)
treebc6c578625c841f6cd4d4c9bdb3560614744e8af /src/xmlpatterns/expr/qevaluationcache.cpp
parent4bd7d10a4a366e49808ed72aae1cbdfe5c9c520b (diff)
parenta4eae8a44ca38739755ba8994251e2b120878ec8 (diff)
downloadQt-6661f5c2222c145d854e225076195b37672637d2.zip
Qt-6661f5c2222c145d854e225076195b37672637d2.tar.gz
Qt-6661f5c2222c145d854e225076195b37672637d2.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fixed use of deleted object in XmlPatterns EvaluationCache
Diffstat (limited to 'src/xmlpatterns/expr/qevaluationcache.cpp')
-rw-r--r--src/xmlpatterns/expr/qevaluationcache.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/xmlpatterns/expr/qevaluationcache.cpp b/src/xmlpatterns/expr/qevaluationcache.cpp
index 67109eb..3b6fc92 100644
--- a/src/xmlpatterns/expr/qevaluationcache.cpp
+++ b/src/xmlpatterns/expr/qevaluationcache.cpp
@@ -49,10 +49,9 @@ template<bool IsForGlobal>
EvaluationCache<IsForGlobal>::EvaluationCache(const Expression::Ptr &op,
const VariableDeclaration *varDecl,
const VariableSlotID aSlot) : SingleContainer(op)
- , m_declaration(varDecl)
+ , m_declarationUsedByMany(varDecl->usedByMany())
, m_varSlot(aSlot)
{
- Q_ASSERT(m_declaration);
Q_ASSERT(m_varSlot > -1);
}
@@ -199,7 +198,7 @@ Expression::Ptr EvaluationCache<IsForGlobal>::compress(const StaticContext::Ptr
if(m_operand->is(IDRangeVariableReference))
return m_operand;
- if(m_declaration->usedByMany())
+ if (m_declarationUsedByMany)
{
/* If it's only an atomic value an EvaluationCache is overkill. However,
* it's still needed for functions like fn:current-time() that must adhere to