Support a NULL window for functions that only need it for dialogs

* Primarily useful for Python where threading can cause problems, and there's no
  need.
This commit is contained in:
baldurk committed 2018-07-11 19:32:16 +01:00
1 parent 64c6c1affc
commit b955ef0b52
2 files changed
+16 -13

No files matched your search

@@ -105,13 +105,16 @@ rdcstr SPIRVDisassembler::DisassembleShader(QWidget *window, const ShaderReflect
if(process.exitStatus() != QProcess::NormalExit || process.exitCode() != 0)
{
GUIInvoke::call(window, [window]() {
RDDialog::critical(
window, QApplication::translate("SPIRVDisassembler", "Error running disassembler"),
QApplication::translate(
"SPIRVDisassembler",
"There was an error invoking the external SPIR-V disassembler."));
});
if(window)
{
GUIInvoke::call(window, [window]() {
RDDialog::critical(
window, QApplication::translate("SPIRVDisassembler", "Error running disassembler"),
QApplication::translate(
"SPIRVDisassembler",
"There was an error invoking the external SPIR-V disassembler."));
});
}
}
if(writesToFile)