Skip to content

Commit

Permalink
Fix null RenderQueueOriginal
Browse files Browse the repository at this point in the history
  • Loading branch information
DeathWeasel1337 committed Feb 7, 2022
1 parent 2efd424 commit 00974b5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,13 @@ public void SetMaterialShaderRenderQueue(int slot, ObjectType objectType, Materi
}
else
{
if (renderQueue == materialProperty.RenderQueueOriginal)
int renderQueueOriginal;
if (materialProperty.RenderQueueOriginal == null)
renderQueueOriginal = material.renderQueue;
else
renderQueueOriginal = (int)materialProperty.RenderQueueOriginal;

if (renderQueue == renderQueueOriginal)
RemoveMaterialShaderRenderQueue(slot, objectType, material, go, false);
else
{
Expand Down

0 comments on commit 00974b5

Please sign in to comment.