mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-19 09:42:01 +00:00
Assign _backgroundContext before starting its worker thread. (#2299)
Fixes a random crash when starting an embedded game.
This commit is contained in:
parent
65ac00833a
commit
c316c059ef
1 changed files with 1 additions and 1 deletions
|
@ -19,6 +19,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
|
|
||||||
public BackgroundContextWorker(IOpenGLContext backgroundContext)
|
public BackgroundContextWorker(IOpenGLContext backgroundContext)
|
||||||
{
|
{
|
||||||
|
_backgroundContext = backgroundContext;
|
||||||
_running = true;
|
_running = true;
|
||||||
|
|
||||||
_signal = new AutoResetEvent(false);
|
_signal = new AutoResetEvent(false);
|
||||||
|
@ -27,7 +28,6 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
|
|
||||||
_thread = new Thread(Run);
|
_thread = new Thread(Run);
|
||||||
_thread.Start();
|
_thread.Start();
|
||||||
_backgroundContext = backgroundContext;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Run()
|
private void Run()
|
||||||
|
|
Loading…
Reference in a new issue