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
No known key found for this signature in database
GPG Key ID: E9F4FDECB669C64F
3 changed files with 8 additions and 3 deletions

@ -1 +1 @@
Subproject commit dd9a2706022676a8bf529a31e6d311124e58942f
Subproject commit f91288c261ecf9cd5a276683a9812fe920265eb7

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);