From 59ef01d95cf3d6aaa1e3ea9f9dd999ebc70baf7d Mon Sep 17 00:00:00 2001 From: Tim Kosse Date: Mon, 19 Sep 2016 16:07:17 +0200 Subject: [PATCH] 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 255b2adea2b5b865e08d83ed06cae3b8863f84a9) --- src/unix/mimetype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 265f86aae0..72c8d4850f 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -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();