From c9841dab38b85b638a142ca1bd7079d147f70cf3 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 25 Oct 2020 21:40:50 -0300 Subject: [PATCH] Fix vertex buffer handle null check (#1638) --- Ryujinx.Graphics.OpenGL/VertexArray.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ryujinx.Graphics.OpenGL/VertexArray.cs b/Ryujinx.Graphics.OpenGL/VertexArray.cs index cc352761d2..64c6a82198 100644 --- a/Ryujinx.Graphics.OpenGL/VertexArray.cs +++ b/Ryujinx.Graphics.OpenGL/VertexArray.cs @@ -37,7 +37,7 @@ namespace Ryujinx.Graphics.OpenGL { VertexBufferDescriptor vb = vertexBuffers[index]; - if (vb.Buffer.Handle != null) + if (vb.Buffer.Handle != BufferHandle.Null) { GL.BindVertexBuffer(bindingIndex, vb.Buffer.Handle.ToInt32(), (IntPtr)vb.Buffer.Offset, vb.Stride); @@ -78,7 +78,7 @@ namespace Ryujinx.Graphics.OpenGL { GL.EnableVertexAttribArray(index); } - + int offset = attrib.Offset; int size = fmtInfo.Components; @@ -129,7 +129,7 @@ namespace Ryujinx.Graphics.OpenGL continue; } - if (_vertexBuffers[attrib.BufferIndex].Buffer.Handle == null) + if (_vertexBuffers[attrib.BufferIndex].Buffer.Handle == BufferHandle.Null) { GL.DisableVertexAttribArray(attribIndex);