Skip to content
This repository was archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
Fix NRE in CCGeometryNode setting sampler state when Texture is null.
Browse files Browse the repository at this point in the history
Fix #309
  • Loading branch information
kjpou1 committed Sep 15, 2015
1 parent 6596416 commit b83668e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc_nodes/CCGeometryNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void RenderBatch()
lastTexture = textureExists ? geometryPacket.Texture.XNATexture : null;
lastAttributes = geometry.InstanceAttributes;
DrawManager.XnaGraphicsDevice.Textures[0] = lastTexture;
DrawManager.XnaGraphicsDevice.SamplerStates[0] = textureExists ? geometryPacket.Texture.SamplerState : null;
DrawManager.XnaGraphicsDevice.SamplerStates[0] = textureExists ? geometryPacket.Texture.SamplerState : SamplerState.LinearClamp;
}

int[] itemIndicies = geometryPacket.Indicies;
Expand Down

0 comments on commit b83668e

Please sign in to comment.