Fixed #3216 (GUI: Crash when cancel is clicked in the New Project dialog)
This commit is contained in:
parent
a8f2dc1fec
commit
7c4c0b628b
|
@ -880,17 +880,19 @@ void MainWindow::NewProjectFile()
|
|||
QString(),
|
||||
filter);
|
||||
|
||||
if (!filepath.isEmpty()) {
|
||||
EnableProjectActions(true);
|
||||
QFileInfo inf(filepath);
|
||||
const QString filename = inf.fileName();
|
||||
FormatAndSetTitle(tr("Project:") + QString(" ") + filename);
|
||||
if (filepath.isEmpty())
|
||||
return;
|
||||
|
||||
EnableProjectActions(true);
|
||||
QFileInfo inf(filepath);
|
||||
const QString filename = inf.fileName();
|
||||
FormatAndSetTitle(tr("Project:") + QString(" ") + filename);
|
||||
|
||||
delete mProject;
|
||||
mProject = new Project(filepath, this);
|
||||
mProject->Create();
|
||||
mProject->Edit();
|
||||
|
||||
delete mProject;
|
||||
mProject = new Project(filepath, this);
|
||||
mProject->Create();
|
||||
mProject->Edit();
|
||||
}
|
||||
AddProjectMRU(filepath);
|
||||
CheckProject(mProject);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue