mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Change python global init/shutdown order to be safe vs running contexts
* If a window (like the PythonShell) owned a context and only stopped it on destruction, it would be destructed after the global shutdown destroyed the interpreter.
This commit is contained in:
@@ -159,19 +159,19 @@ int main(int argc, char *argv[])
|
||||
|
||||
GUIInvoke::init();
|
||||
|
||||
CaptureContext ctx(filename, remoteHost, remoteIdent, temp, config);
|
||||
|
||||
PythonContext::GlobalInit();
|
||||
|
||||
while(ctx.isRunning())
|
||||
{
|
||||
application.processEvents(QEventLoop::WaitForMoreEvents);
|
||||
QCoreApplication::sendPostedEvents();
|
||||
CaptureContext ctx(filename, remoteHost, remoteIdent, temp, config);
|
||||
|
||||
while(ctx.isRunning())
|
||||
{
|
||||
application.processEvents(QEventLoop::WaitForMoreEvents);
|
||||
QCoreApplication::sendPostedEvents();
|
||||
}
|
||||
|
||||
config.Save();
|
||||
}
|
||||
|
||||
PythonContext::GlobalShutdown();
|
||||
|
||||
config.Save();
|
||||
}
|
||||
|
||||
delete[] argv_mod;
|
||||
|
||||
Reference in New Issue
Block a user