X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3103e8a97e834e9793f0eb149aa82a99fd64ef9a..f2c88494b6978bee502f4c856ba9dc7e3b7c3954:/src/common/stdpbase.cpp diff --git a/src/common/stdpbase.cpp b/src/common/stdpbase.cpp index 5c104c2fe9..18ad257b92 100644 --- a/src/common/stdpbase.cpp +++ b/src/common/stdpbase.cpp @@ -47,7 +47,10 @@ static wxStandardPaths gs_stdPaths; /* static */ wxStandardPathsBase& wxStandardPathsBase::Get() { - return wxTheApp->GetTraits()->GetStandardPaths(); + wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + wxCHECK_MSG( traits, gs_stdPaths, _T("create wxApp before calling this") ); + + return traits->GetStandardPaths(); } wxStandardPathsBase& wxAppTraitsBase::GetStandardPaths() @@ -70,6 +73,11 @@ wxString wxStandardPathsBase::GetUserLocalDataDir() const return GetUserDataDir(); } +wxString wxStandardPathsBase::GetDocumentsDir() const +{ + return wxFileName::GetHomeDir(); +} + /* static */ wxString wxStandardPathsBase::AppendAppName(const wxString& dir) {