Why are you using wxStandardPathsBase? The "standard" way should be like this:
wxStandardPaths::Get().GetUserDataDir()
Anyway, I don't know if this fixes your crash, but I never had any problems with this line of code (not on Windows and not on Linux).
I sure was doing what you call the standard way
The problem was that I had put all the path names along with initialising code into a static object, so initialisation is done implicitely, and we can avoid calling
if(someVariable.IsEmpty()) a hundred times.
Unluckily,
wxStandardPaths does not like being called from global constructors... although the documentation speaks of "initialised to reasonable values", the meaning of "reasonable" is apparently NULL.
I've reduced all the checks to testing one boolean now, and initialisation is done the first time any directory function is used... that works, but I am not 100% happy with it.