Fixed CID 1378777, uncaught exception
This commit is contained in:
parent
9eed9adf3c
commit
33664a88d1
|
@ -1448,7 +1448,17 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile)
|
||||||
if (!projectFile->getImportProject().isEmpty()) {
|
if (!projectFile->getImportProject().isEmpty()) {
|
||||||
ImportProject p;
|
ImportProject p;
|
||||||
QString prjfile = inf.canonicalPath() + '/' + projectFile->getImportProject();
|
QString prjfile = inf.canonicalPath() + '/' + projectFile->getImportProject();
|
||||||
p.import(prjfile.toStdString());
|
try {
|
||||||
|
p.import(prjfile.toStdString());
|
||||||
|
} catch (InternalError &e) {
|
||||||
|
QMessageBox msg(QMessageBox::Critical,
|
||||||
|
tr("Cppcheck"),
|
||||||
|
tr("Failed to import '%1', analysis is stopped").arg(prjfile),
|
||||||
|
QMessageBox::Ok,
|
||||||
|
this);
|
||||||
|
msg.exec();
|
||||||
|
return;
|
||||||
|
}
|
||||||
doAnalyzeProject(p);
|
doAnalyzeProject(p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue