QmlJS: Fix crash in PathsAndLanguages::compact()

Task-number: QTCREATORBUG-13786
Change-Id: If8c84714382c751f51315d62e1d4b0764e4431ff
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
This commit is contained in:
hjk
2015-03-04 10:25:54 +01:00
parent e35809bd31
commit e36b40161e

View File

@@ -300,7 +300,11 @@ bool PathsAndLanguages::maybeInsert(const PathAndLanguage &pathAndLanguage) {
return true;
}
void PathsAndLanguages::compact() {
void PathsAndLanguages::compact()
{
if (m_list.isEmpty())
return;
int oldCompactionPlace = 0;
Utils::FileName oldPath = m_list.first().path();
QList<PathAndLanguage> compactedList;