projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Warning fix.
[wxWidgets.git]
/
src
/
common
/
stdpbase.cpp
diff --git
a/src/common/stdpbase.cpp
b/src/common/stdpbase.cpp
index ab6b882ef6b9b0f6f19ddab865c1683990033126..6f9bba7c978ced79ea4c8fcc073a77c3534bbe58 100644
(file)
--- a/
src/common/stdpbase.cpp
+++ b/
src/common/stdpbase.cpp
@@
-24,6
+24,8
@@
#pragma hdrstop
#endif
#pragma hdrstop
#endif
+#if wxUSE_STDPATHS
+
#ifndef WX_PRECOMP
#include "wx/app.h"
#endif //WX_PRECOMP
#ifndef WX_PRECOMP
#include "wx/app.h"
#endif //WX_PRECOMP
@@
-45,7
+47,10
@@
static wxStandardPaths gs_stdPaths;
/* static */
wxStandardPathsBase& wxStandardPathsBase::Get()
{
/* 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()
}
wxStandardPathsBase& wxAppTraitsBase::GetStandardPaths()
@@
-73,7
+78,7
@@
wxString wxStandardPathsBase::AppendAppName(const wxString& dir)
{
wxString subdir(dir);
{
wxString subdir(dir);
- // empty string indicates that an error has occured, don't touch it then
+ // empty string indicates that an error has occur
r
ed, don't touch it then
if ( !subdir.empty() )
{
const wxString appname = wxTheApp->GetAppName();
if ( !subdir.empty() )
{
const wxString appname = wxTheApp->GetAppName();
@@
-90,3
+95,4
@@
wxString wxStandardPathsBase::AppendAppName(const wxString& dir)
return subdir;
}
return subdir;
}
+#endif // wxUSE_STDPATHS