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:
parent
c916845aaa
commit
255b2adea2
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user