Do not return empty tokens when parsing XDG_DATA_HOME and XDG_DATA_DIRS. This fixes an assert where wxString::Last would have been called on an empty string.

This commit is contained in:
Tim Kosse 2016-09-19 16:07:17 +02:00
parent c916845aaa
commit 255b2adea2

View File

@ -558,7 +558,7 @@ void wxMimeTypesManagerImpl::Initialize(int mailcapStyles,
}
wxArrayString dirs;
wxStringTokenizer tokenizer(xdgDataDirs, ":");
wxStringTokenizer tokenizer(xdgDataDirs, ":", wxTOKEN_STRTOK);
while ( tokenizer.HasMoreTokens() )
{
wxString p = tokenizer.GetNextToken();