Commit a8c5d1f8 authored by Christian Kamm's avatar Christian Kamm
Browse files

C++ indenter: Be more careful when comparing states.

Task-number: QTCREATORBUG-1818
parent 7ae3fd5a
......@@ -427,7 +427,8 @@ void CodeFormatter::updateStateUntil(const QTextBlock &endBlock)
break;
if (blockData.m_blockRevision != it.revision())
break;
if (previousState != blockData.m_beginState)
if (previousState.isEmpty() || blockData.m_beginState.isEmpty()
|| previousState != blockData.m_beginState)
break;
if (loadLexerState(it) == -1)
break;
......
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