Skip to content

Commit 31aff0b

Browse files
committed
Prevent possible crash in FileNode
1 parent d8f9637 commit 31aff0b

File tree

1 file changed

+2
-2
lines changed
  • External/Plugins/ProjectManager/Controls/TreeView

1 file changed

+2
-2
lines changed

External/Plugins/ProjectManager/Controls/TreeView/FileNode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public override void Refresh(bool recursive)
5555
string path = BackingPath;
5656
string ext = Path.GetExtension(path).ToLower();
5757

58-
if (project.IsPathHidden(path))
58+
if (project != null && project.IsPathHidden(path))
5959
ImageIndex = Icons.HiddenFile.Index;
6060
else if ((FileInspector.IsActionScript(path, ext) || FileInspector.IsHaxeFile(path, ext)) && project.IsCompileTarget(path))
6161
ImageIndex = Icons.ActionScriptCompile.Index;
@@ -72,7 +72,7 @@ public override void Refresh(bool recursive)
7272
Text = Path.GetFileName(path);
7373

7474
string colorId = "ProjectTreeView.ForeColor";
75-
if (project.IsLibraryAsset(path))
75+
if (project != null && project.IsLibraryAsset(path))
7676
{
7777
LibraryAsset asset = project.GetAsset(path);
7878
if (asset != null && asset.IsSwc)

0 commit comments

Comments
 (0)