Valgrind: Stop parsing if file open failed

Reported by Coverity.

Change-Id: Ibf12c563cb2cab50183c62a4e51cdbe238d0127e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2022-06-08 13:14:27 +03:00
committed by Orgad Shaneh
parent 5c0ad89d91
commit 67f98c0c83

View File

@@ -270,7 +270,10 @@ void CallgrindToolRunner::triggerParse()
cleanupTempFile(); cleanupTempFile();
{ {
TemporaryFile dataFile("callgrind.out"); TemporaryFile dataFile("callgrind.out");
dataFile.open(); if (!dataFile.open()) {
showStatusMessage(tr("Failed opening temp file..."));
return;
}
m_hostOutputFile = FilePath::fromString(dataFile.fileName()); m_hostOutputFile = FilePath::fromString(dataFile.fileName());
} }