mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +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:
@@ -105,7 +105,7 @@ rdcstr SPIRVDisassembler::DisassembleShader(QWidget *window, const ShaderReflect
|
||||
|
||||
if(process.exitStatus() != QProcess::NormalExit || process.exitCode() != 0)
|
||||
{
|
||||
GUIInvoke::call([window]() {
|
||||
GUIInvoke::call(window, [window]() {
|
||||
RDDialog::critical(
|
||||
window, QApplication::translate("SPIRVDisassembler", "Error running disassembler"),
|
||||
QApplication::translate(
|
||||
|
||||
Reference in New Issue
Block a user