forked from qt-creator/qt-creator
Don't crash when pro-file is empty.
Reviewed-by: Oswald Buddenhagen
This commit is contained in:
@@ -668,7 +668,7 @@ void Qt4PriFileNode::changeFiles(const FileType fileType,
|
||||
contents = QString::fromLatin1(qfile.readAll()); // yes, really latin1
|
||||
qfile.close();
|
||||
lines = contents.split(QLatin1Char('\n'));
|
||||
while (lines.last().isEmpty())
|
||||
while (!lines.isEmpty() && lines.last().isEmpty())
|
||||
lines.removeLast();
|
||||
} else {
|
||||
m_project->proFileParseError(tr("Error while reading PRO file %1: %2")
|
||||
|
||||
Reference in New Issue
Block a user