Fix soft crash on "blank" shop assets

This commit is contained in:
GMatrixGames
2023-02-09 17:54:49 -05:00
parent f3c1103b0c
commit 995cd25bc4
3 changed files with 8 additions and 3 deletions

View File

@@ -47,7 +47,12 @@ public class BaseMaterialInstance : BaseIcon
}
if (Preview == null)
{
if (material.TryGetValue(out FPackageIndex parent, "Parent"))
Utils.TryGetPackageIndexExport(parent, out material);
goto texture_finding;
}
foreach (var vectorParameter in material.VectorParameterValues)
{

View File

@@ -634,9 +634,9 @@ Snooper aims to give an accurate preview of models, materials, skeletal animatio
ImGui.TreePop();
}
ImGui.SetNextItemOpen(true, ImGuiCond.Appearing);
if (ImGui.TreeNode("Switchs"))
if (ImGui.TreeNode("Switches"))
{
material.ImGuiDictionaries("switchs", material.Parameters.Switchs, true);
material.ImGuiDictionaries("switches", material.Parameters.Switches, true);
ImGui.TreePop();
}
ImGui.SetNextItemOpen(true, ImGuiCond.Appearing);