Added a check to see if input is null.

This commit is contained in:
Harrison Deng 2020-02-22 00:01:16 -05:00
parent 4a9c2b4e4d
commit 0a57bf3d14

View File

@ -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};