Skip to content

Commit 830930a

Browse files
committed
nullcheck in copy folder
1 parent e6d52d3 commit 830930a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Packages/webxr/Editor/WebXRMenu.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ static void CopyWebGLTemplates()
2121
DestroyImmediate(webXRMenu);
2222
string packagePath = Path.GetDirectoryName(packageAssetFullPath);
2323

24+
if (packagePath == null)
25+
{
26+
Debug.LogError("Copy failed, could not find package");
27+
return;
28+
}
2429
CopyFolder(Path.Combine(packagePath, "Hidden~"), Application.dataPath);
2530
AssetDatabase.Refresh();
2631
}

0 commit comments

Comments
 (0)