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

@@ -1018,7 +1018,7 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler,
return pi.dwProcessId;
}
wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
wxAppTraits *traits = wxApp::GetTraitsIfExists();
wxCHECK_MSG( traits, -1, wxT("no wxAppTraits in wxExecute()?") );
void *cookie = NULL;