Commit 5aa8a63f authored by Eike Ziller's avatar Eike Ziller

CppEditor: Fix potential crash

The m_snapshotUpdater may never be accessed directly.

Change-Id: Id773a291f66e93a48ae46f2b1c04417af2f26763
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent f161f1a2
...@@ -510,7 +510,7 @@ SemanticInfo::Source CppEditorSupport::currentSource(bool force) ...@@ -510,7 +510,7 @@ SemanticInfo::Source CppEditorSupport::currentSource(bool force)
int line = 0, column = 0; int line = 0, column = 0;
m_textEditor->convertPosition(m_textEditor->editorWidget()->position(), &line, &column); m_textEditor->convertPosition(m_textEditor->editorWidget()->position(), &line, &column);
const Snapshot snapshot = m_snapshotUpdater->snapshot(); const Snapshot snapshot = snapshotUpdater()->snapshot();
QByteArray code; QByteArray code;
if (force || m_lastSemanticInfo.revision != editorRevision()) if (force || m_lastSemanticInfo.revision != editorRevision())
......
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