Check whether geobuffers is null before indexing it

This is an attempt to fix #474
This commit is contained in:
Kevin Caccamo 2020-09-24 20:52:33 -04:00
parent 9659ab1d19
commit 0b4b781980
No known key found for this signature in database
GPG key ID: 483F90E1F56A8723

View file

@ -104,7 +104,17 @@ namespace CodeImp.DoomBuilder.VisualModes
#region ================== Properties
internal VertexBuffer GeometryBuffer { get { return geobuffers[spriteframe]; } }
internal VertexBuffer GeometryBuffer { get {
if (geobuffers != null)
{
return geobuffers[spriteframe];
}
else
{
return null;
}
}
}
internal VertexBuffer CageBuffer { get { return cagebuffer; } } //mxd
internal int CageLength { get { return cagelength; } } //mxd
internal bool NeedsUpdateGeo { get { return updategeo; } }