Use wxApp::GetTraitsIfExists() wrappers when applicable

This is simpler and more clear than testing wxTheApp explicitly.

No real changes.
This commit is contained in:
Vadim Zeitlin
2021-03-07 15:43:55 +01:00
parent 69e48f036b
commit 9073221584
11 changed files with 11 additions and 13 deletions

View File

@@ -413,7 +413,7 @@ wxFontMapperBase *wxFontMapperBase::Get()
{
if ( !sm_instance )
{
wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
wxAppTraits *traits = wxApp::GetTraitsIfExists();
if ( traits )
{
sm_instance = traits->CreateFontMapper();