Commit 2875aa96 authored by Milian Wolff's avatar Milian Wolff
Browse files

Guard against invalid ptr access in CTestFindJob::findTestCases

Assuming the job gets killed and then the queued connection to
findTestCases arrives, we could potentially crash. Now we check
for the validity of the m_suite pointer to prevent this theoretical
crash altogether.

Thanks for Igur Kushnir for spotting this!
parent 8b5336df
......@@ -33,6 +33,9 @@ void CTestFindJob::start()
void CTestFindJob::findTestCases()
if (!m_suite)
const auto& sourceFiles = m_suite->sourceFiles();
for (const auto& file : sourceFiles) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment