Fix observed exception
This commit is contained in:
parent
45ff2d5e54
commit
3888cab962
1 changed files with 4 additions and 2 deletions
|
|
@ -343,7 +343,8 @@ namespace MatterHackers.GCodeVisualizer
|
|||
for (int i = renderInfo.StartLayerIndex; i < renderInfo.EndLayerIndex - 1; i++)
|
||||
{
|
||||
int featuresOnLayer = renderFeatures[i].Count;
|
||||
if (featuresOnLayer > 1)
|
||||
if (featuresOnLayer > 1
|
||||
&& layerVertexBuffer[i] != null)
|
||||
{
|
||||
layerVertexBuffer[i].RenderRange(0, featureEndIndex[i][featuresOnLayer - 1]);
|
||||
}
|
||||
|
|
@ -372,7 +373,8 @@ namespace MatterHackers.GCodeVisualizer
|
|||
startFeature = Math.Max(endFeature - 1, 0);
|
||||
}
|
||||
|
||||
if (endFeature > startFeature)
|
||||
if (endFeature > startFeature
|
||||
&& layerVertexBuffer[layerIndex] != null)
|
||||
{
|
||||
int ellementCount = featureEndIndex[layerIndex][endFeature - 1] - featureStartIndex[layerIndex][startFeature];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue