Commit 8fed9dbd authored by Laurent Montel's avatar Laurent Montel 😁

Fix warning about index outside the valid range

parent d7d676b3
......@@ -650,7 +650,7 @@ void AddresseeLineEdit::loadContacts()
for (; it != end; ++it) {
KEmailAddress::extractEmailAddressAndName(*it, email, name);
name = KEmailAddress::quoteNameIfNecessary(name);
if ((name[0] == QLatin1Char('"')) && (name[name.length() - 1] == QLatin1Char('"'))) {
if (!name.isEmpty() && (name[0] == QLatin1Char('"')) && (name[name.length() - 1] == QLatin1Char('"'))) {
name.remove(0, 1);
name.chop(1);
}
......
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