aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/VertexArray.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/VertexArray.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/VertexArray.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.OpenGL/VertexArray.cs b/Ryujinx.Graphics.OpenGL/VertexArray.cs
index 26e63364..721a90f0 100644
--- a/Ryujinx.Graphics.OpenGL/VertexArray.cs
+++ b/Ryujinx.Graphics.OpenGL/VertexArray.cs
@@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.OpenGL
{
class VertexArray : IDisposable
{
- public int Handle { get; }
+ public int Handle { get; private set; }
private bool _needsAttribsUpdate;
@@ -128,7 +128,12 @@ namespace Ryujinx.Graphics.OpenGL
public void Dispose()
{
- GL.DeleteVertexArray(Handle);
+ if (Handle != 0)
+ {
+ GL.DeleteVertexArray(Handle);
+
+ Handle = 0;
+ }
}
}
}