forked from qt-creator/qt-creator
		
	Generic Highlighter: Don't crash with bogus #pop directives.
Task-number: QTCREATORBUG-7583 Change-Id: Ie11c0c1d9b900c5d5d92c0e856bae762bb90cb4a Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
		@@ -323,8 +323,11 @@ void Highlighter::changeContext(const QString &contextName,
 | 
			
		||||
{
 | 
			
		||||
    if (contextName.startsWith(kPop)) {
 | 
			
		||||
        QStringList list = contextName.split(kHash, QString::SkipEmptyParts);
 | 
			
		||||
        for (int i = 0; i < list.size(); ++i)
 | 
			
		||||
        for (int i = 0; i < list.size(); ++i) {
 | 
			
		||||
            if (m_contexts.isEmpty())
 | 
			
		||||
                throw HighlighterException();
 | 
			
		||||
            m_contexts.pop_back();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (extractObservableState(currentBlockState()) >= PersistentsStart) {
 | 
			
		||||
            // One or more contexts were popped during during a persistent state.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user