Commit 6639da4d authored by Robert Loehning's avatar Robert Loehning
Browse files

Don't crash when pro-file is empty.

Reviewed-by: Oswald Buddenhagen
parent fd7c1173
......@@ -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")
......
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