diff --git a/Blarg.GameFramework/Graphics/VertexBuffer.cs b/Blarg.GameFramework/Graphics/VertexBuffer.cs index 393c34c..97a1031 100644 --- a/Blarg.GameFramework/Graphics/VertexBuffer.cs +++ b/Blarg.GameFramework/Graphics/VertexBuffer.cs @@ -111,6 +111,8 @@ namespace Blarg.GameFramework.Graphics { if (source == null) throw new ArgumentNullException("source"); + if (source.NumElements <= 0) + throw new InvalidOperationException(); var attributes = new VertexAttributes[source.NumAttributes]; for (int i = 0; i < attributes.Length; ++i)