diff --git a/src/libs/cplusplus/TypeOfExpression.cpp b/src/libs/cplusplus/TypeOfExpression.cpp index b7bab3b033d..0763ac2bf26 100644 --- a/src/libs/cplusplus/TypeOfExpression.cpp +++ b/src/libs/cplusplus/TypeOfExpression.cpp @@ -61,7 +61,7 @@ void TypeOfExpression::init(Document::Ptr thisDocument, const Snapshot &snapshot Q_ASSERT(m_bindings.isNull()); m_bindings = bindings; if (m_bindings.isNull()) - m_bindings.reset(new CreateBindings(thisDocument, snapshot)); + m_bindings = QSharedPointer(new CreateBindings(thisDocument, snapshot)); m_environment.clear(); m_autoDeclarationsBeingResolved = autoDeclarationsBeingResolved;