From 33664a88d1e1c652d5ce61f7763e4866356b7321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 2 Sep 2017 11:11:35 +0200 Subject: [PATCH] Fixed CID 1378777, uncaught exception --- gui/mainwindow.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 7ac588377..04a5812cb 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1448,7 +1448,17 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile) if (!projectFile->getImportProject().isEmpty()) { ImportProject p; 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); return; }