Only load an empty project if we don't have one already

We may have multiple projects if one of them is a temporary
project used for importing settings

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5423
This commit is contained in:
Jon Evans 2020-08-30 12:27:20 -04:00
parent c073749a5c
commit 046fef2cc1
1 changed files with 2 additions and 1 deletions

View File

@ -741,6 +741,7 @@ bool SETTINGS_MANAGER::UnloadProject( PROJECT* aProject, bool aSave )
// Immediately reload a null project; this is required until the rest of the application
// is refactored to not assume that Prj() always works
if( m_projects.empty() )
LoadProject( "" );
// Remove the reference in the environment to the previous project