CppTools: Fix crash on shutdown

We need to wait for the document parser, otherwise the CppModelManager
object might get destroyed first and will be referenced later in
CppEditorSupport::parse().

Change-Id: I1b591640c1da3e63e49ac0b4b8af41aae31b3d43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-11-19 16:18:27 +01:00
parent e4dd8e75d1
commit 067ae2439b

View File

@@ -169,6 +169,7 @@ CppEditorSupport::~CppEditorSupport()
m_highlighter.cancel();
m_futureSemanticInfo.cancel();
m_documentParser.waitForFinished();
m_highlighter.waitForFinished();
m_futureSemanticInfo.waitForFinished();
}