forked from qt-creator/qt-creator
ProjectExplorer: Fix crash on close while tree is scanned
* Open CMakeLists.txt of Qt Creator * While it scans the tree, close Qt Creator Change-Id: Ieabec0f7fe0495f68e833d7ced03076bc1ceddbb Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
ae794d5914
commit
08972d1952
@@ -103,11 +103,12 @@ TreeScanner::Result TreeScanner::result() const
|
|||||||
|
|
||||||
TreeScanner::Result TreeScanner::release()
|
TreeScanner::Result TreeScanner::release()
|
||||||
{
|
{
|
||||||
if (isFinished()) {
|
if (isFinished() && m_scanFuture.resultCount() > 0) {
|
||||||
auto result = m_scanFuture.result();
|
auto result = m_scanFuture.result();
|
||||||
m_scanFuture = Future();
|
m_scanFuture = Future();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
m_scanFuture = Future();
|
||||||
return Result();
|
return Result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user