fix crash on 0 instance

main
cosmonaut 2020-12-14 00:52:40 -08:00
parent 808d50ccc2
commit f5cdd0b566
1 changed files with 9 additions and 6 deletions

View File

@ -44,12 +44,15 @@ namespace Kav
public void SetData() public void SetData()
{ {
VertexBuffer.SetData( if (InstanceCount > 0)
InstanceDataArray, {
0, VertexBuffer.SetData(
InstanceCount, InstanceDataArray,
SetDataOptions.NoOverwrite 0,
); InstanceCount,
SetDataOptions.NoOverwrite
);
}
} }
public void Clear() public void Clear()