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.
(cherry picked from commit 255b2adea2
)
This commit is contained in:
@@ -561,7 +561,7 @@ void wxMimeTypesManagerImpl::Initialize(int mailcapStyles,
|
||||
}
|
||||
|
||||
wxArrayString dirs;
|
||||
wxStringTokenizer tokenizer(xdgDataDirs, ":");
|
||||
wxStringTokenizer tokenizer(xdgDataDirs, ":", wxTOKEN_STRTOK);
|
||||
while ( tokenizer.HasMoreTokens() )
|
||||
{
|
||||
wxString p = tokenizer.GetNextToken();
|
||||
|
Reference in New Issue
Block a user