mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Don't race to a double-delete, LambdaThread deletes its own thread
This commit is contained in:
@@ -230,6 +230,7 @@ public slots:
|
||||
m_Thread->quit();
|
||||
deleteLater();
|
||||
m_Thread->deleteLater();
|
||||
m_Thread = NULL;
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -242,7 +243,7 @@ public:
|
||||
}
|
||||
|
||||
void start(QThread::Priority prio = QThread::InheritPriority) { m_Thread->start(prio); }
|
||||
bool isRunning() { return m_Thread->isRunning(); }
|
||||
bool isRunning() { return m_Thread && m_Thread->isRunning(); }
|
||||
};
|
||||
|
||||
// helper for doing a manual blocking invoke of a dialog
|
||||
|
||||
@@ -94,7 +94,7 @@ void RenderManager::CloseThread()
|
||||
{
|
||||
}
|
||||
|
||||
m_Thread->deleteLater();
|
||||
// the thread deletes itself, don't delete here
|
||||
|
||||
m_Thread = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user