Explorar o código

Assign _backgroundContext before starting its worker thread. (#2299)

Fixes a random crash when starting an embedded game.
riperiperi %!s(int64=4) %!d(string=hai) anos
pai
achega
c316c059ef
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Ryujinx.Graphics.OpenGL/BackgroundContextWorker.cs

+ 1 - 1
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()