Use wxApp::GetTraitsIfExists() wrappers when applicable
This is simpler and more clear than testing wxTheApp explicitly. No real changes.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user