mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1340803 - Make nsMIMEInfoWin::GetPossibleLocalHandlers check fileExt is non-empty before checking its first char. r=jimm
--HG-- extra : rebase_source : a3d43e53ddd9f0b5d084434bad88ac0463f8686f
This commit is contained in:
parent
08c7d6f388
commit
6db3552e69
@ -612,8 +612,9 @@ nsMIMEInfoWin::GetPossibleLocalHandlers(nsIArray **_retval)
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsAutoString fileExtToUse;
|
nsAutoString fileExtToUse;
|
||||||
if (fileExt.First() != '.')
|
if (!fileExt.IsEmpty() && fileExt.First() != '.') {
|
||||||
fileExtToUse = char16_t('.');
|
fileExtToUse = char16_t('.');
|
||||||
|
}
|
||||||
fileExtToUse.Append(NS_ConvertUTF8toUTF16(fileExt));
|
fileExtToUse.Append(NS_ConvertUTF8toUTF16(fileExt));
|
||||||
|
|
||||||
// Note, the order in which these occur has an effect on the
|
// Note, the order in which these occur has an effect on the
|
||||||
|
Loading…
Reference in New Issue
Block a user