CppEditor: Fix potential crash

The m_snapshotUpdater may never be accessed directly.

Change-Id: Id773a291f66e93a48ae46f2b1c04417af2f26763
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Eike Ziller
2014-01-07 10:43:59 +01:00
parent f161f1a25d
commit 5aa8a63f90

View File

@@ -510,7 +510,7 @@ SemanticInfo::Source CppEditorSupport::currentSource(bool force)
int line = 0, column = 0;
m_textEditor->convertPosition(m_textEditor->editorWidget()->position(), &line, &column);
const Snapshot snapshot = m_snapshotUpdater->snapshot();
const Snapshot snapshot = snapshotUpdater()->snapshot();
QByteArray code;
if (force || m_lastSemanticInfo.revision != editorRevision())