Commit d4e49c08 authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by Erik Verbruggen

Debugger: Don't use document with AST from indexing snapshot

...since the AST will be released at some point from another thread.

Change-Id: I71d20228ebec71e98dca3474452677ec63ffe4c6
Reviewed-by: default avatarErik Verbruggen <>
parent 82325d10
......@@ -2828,10 +2828,7 @@ static CPlusPlus::Document::Ptr getParsedDocument(const QString &fileName,
unsigned BreakpointCorrectionContext::fixLineNumber(const QString &fileName,
unsigned lineNumber) const
CPlusPlus::Document::Ptr doc = m_snapshot.document(fileName);
if (!doc || !doc->translationUnit()->ast())
doc = getParsedDocument(fileName, m_workingCopy, m_snapshot);
const CPlusPlus::Document::Ptr doc = getParsedDocument(fileName, m_workingCopy, m_snapshot);
CPlusPlus::FindCdbBreakpoint findVisitor(doc->translationUnit());
const unsigned correctedLine = findVisitor(lineNumber);
if (!correctedLine) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment