From 0a57bf3d14a33dfab9994be6e0b7b7d7479dafa4 Mon Sep 17 00:00:00 2001 From: Harrison Date: Sat, 22 Feb 2020 00:01:16 -0500 Subject: [PATCH] Added a check to see if input is null. --- RecrownedGTK/Graphics/Render/RectTexture.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RecrownedGTK/Graphics/Render/RectTexture.cs b/RecrownedGTK/Graphics/Render/RectTexture.cs index faa7013..132718c 100644 --- a/RecrownedGTK/Graphics/Render/RectTexture.cs +++ b/RecrownedGTK/Graphics/Render/RectTexture.cs @@ -1,5 +1,6 @@ using RecrownedGTK.Types; using OpenTK.Graphics; +using System; namespace RecrownedGTK.Graphics.Render { public class RectTexture : Rectangle, IDrawable { private uint[] indices; @@ -55,8 +56,8 @@ namespace RecrownedGTK.Graphics.Render { } } public RectTexture(TextureData textureData) { + this.textureData = textureData ?? throw new ArgumentNullException("Texture data can't be Null."); this.textureData = textureData; - vertices = new VertexInformation[4]; indices = new uint[] {0, 1, 3, 1, 2, 3};