diff options
author | riperiperi <rhy3756547@hotmail.com> | 2021-05-20 14:29:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 15:29:10 +0200 |
commit | c316c059ef2ffff40544530dd649c3fa9ef83ec4 (patch) | |
tree | 4690d526138557a6855441fa71d7ae09185e9ef2 | |
parent | 65ac00833a8b51fe9ea6f12ffdfadeb098a6c360 (diff) |
Assign _backgroundContext before starting its worker thread. (#2299)
Fixes a random crash when starting an embedded game.
-rw-r--r-- | Ryujinx.Graphics.OpenGL/BackgroundContextWorker.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.OpenGL/BackgroundContextWorker.cs b/Ryujinx.Graphics.OpenGL/BackgroundContextWorker.cs index f942037c..3f1c055b 100644 --- a/Ryujinx.Graphics.OpenGL/BackgroundContextWorker.cs +++ b/Ryujinx.Graphics.OpenGL/BackgroundContextWorker.cs @@ -19,6 +19,7 @@ namespace Ryujinx.Graphics.OpenGL public BackgroundContextWorker(IOpenGLContext backgroundContext) { + _backgroundContext = backgroundContext; _running = true; _signal = new AutoResetEvent(false); @@ -27,7 +28,6 @@ namespace Ryujinx.Graphics.OpenGL _thread = new Thread(Run); _thread.Start(); - _backgroundContext = backgroundContext; } private void Run() |