Skip to content

Commit c88fd7c

Browse files
committed
Added an extra null check
1 parent de94644 commit c88fd7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Editor/Editors/Inspectors/ModularShaderEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public override VisualElement CreateInspectorGUI()
5959
}
6060

6161
string path = "";
62-
if (_shader.LastGeneratedShaders.Count > 0 && _shader.LastGeneratedShaders[0] != null)
62+
if (_shader.LastGeneratedShaders != null &&_shader.LastGeneratedShaders.Count > 0 && _shader.LastGeneratedShaders[0] != null)
6363
{
6464
path = Path.GetDirectoryName(AssetDatabase.GetAssetPath(_shader.LastGeneratedShaders[0]));
6565
}

0 commit comments

Comments
 (0)