Просмотр исходного кода

gtk: Fix a NRE when disposing OpenGL (#4648)

TSRBerry 3 лет назад
Родитель
Сommit
a947a45d81
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      Ryujinx/Ui/GLRenderer.cs

+ 2 - 2
Ryujinx/Ui/GLRenderer.cs

@@ -119,7 +119,7 @@ namespace Ryujinx.Ui
             }
             }
             catch (Exception) { }
             catch (Exception) { }
 
 
-            Device.DisposeGpu();
+            Device?.DisposeGpu();
             NpadManager.Dispose();
             NpadManager.Dispose();
 
 
             // Unbind context and destroy everything
             // Unbind context and destroy everything
@@ -129,7 +129,7 @@ namespace Ryujinx.Ui
             }
             }
             catch (Exception) { }
             catch (Exception) { }
 
 
-            _openGLContext.Dispose();
+            _openGLContext?.Dispose();
         }
         }
     }
     }
 }
 }