Fix windows crash at startup, again...
... The fix done at2f9322e
was undone at43b1afc
because of the unacceptable file dependencies. This fixes it by other means. Make a null check in SetProjectTitle in case it is invoked before ProjectWindow has been constructed; also ensure in ProjectManager::New that it is called at least once after that.
This commit is contained in:
parent
c5a1dad275
commit
bb7964122e
|
@ -103,7 +103,10 @@ void ProjectFileIO::UpdatePrefs()
|
|||
void ProjectFileIO::SetProjectTitle( int number)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &window = GetProjectFrame( project );
|
||||
auto pWindow = project.GetFrame();
|
||||
if ( !pWindow )
|
||||
return;
|
||||
auto &window = *pWindow;
|
||||
wxString name = project.GetProjectName();
|
||||
|
||||
// If we are showing project numbers, then we also explicitly show "<untitled>" if there
|
||||
|
|
|
@ -360,6 +360,8 @@ AudacityProject *ProjectManager::New()
|
|||
auto &projectManager = Get( project );
|
||||
auto &window = ProjectWindow::Get( *p );
|
||||
window.Init();
|
||||
|
||||
ProjectFileIO::Get( *p ).SetProjectTitle();
|
||||
|
||||
MissingAliasFilesDialog::SetShouldShow(true);
|
||||
MenuManager::Get( project ).CreateMenusAndCommands( project );
|
||||
|
|
Loading…
Reference in New Issue