mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
GUIInvoke takes a QObject* to avoid callbacks after object lifetime
* The GUIInvoke object takes a QObject, and uses QPointer to check that it hasn't been deleted when the callback fires. This prevents delayed callbacks from executing after the object has been deleted and crashing. * In most cases the pointer is just 'this'.
This commit is contained in:
@@ -694,7 +694,7 @@ void PixelHistoryView::startDebug(EventTag tag)
|
||||
return;
|
||||
}
|
||||
|
||||
GUIInvoke::call([this, trace]() {
|
||||
GUIInvoke::call(this, [this, trace]() {
|
||||
QString debugContext = QFormatStr("Pixel %1,%2").arg(m_Pixel.x()).arg(m_Pixel.y());
|
||||
|
||||
const ShaderReflection *shaderDetails =
|
||||
|
||||
Reference in New Issue
Block a user