Skip to content

Commit

Permalink
fix to a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slipster216 committed Aug 25, 2016
1 parent d56df8c commit 5f57735
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions VertexInstanceStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,14 @@ public Mesh Apply(bool markNoLongerReadable = true)
MeshRenderer mr = GetComponent<MeshRenderer>();
MeshFilter mf = GetComponent<MeshFilter>();

if (mr != null && mf != null)
if (mr != null && mf != null && mf.sharedMesh != null)
{
int vertexCount = mf.sharedMesh.vertexCount;
Mesh stream = null;
#if UNITY_EDITOR
stream = meshStream;
#endif
if (stream == null || vertexCount != stream.vertexCount && mf.sharedMesh != null)
if (stream == null || vertexCount != stream.vertexCount)
{
if (stream != null)
{
Expand Down

0 comments on commit 5f57735

Please sign in to comment.