don't allow zero length VBO's to be used as a source to copy from

This commit is contained in:
Gered 2013-08-27 21:25:26 -04:00
parent 07fd5baa8e
commit 68a401a463

View file

@ -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)