Skip to content

Commit

Permalink
Fix soft crash on "blank" shop assets
Browse files Browse the repository at this point in the history
  • Loading branch information
GMatrixGames committed Feb 9, 2023
1 parent f3c1103 commit 995cd25
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions FModel/Creator/Bases/FN/BaseMaterialInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ public override void ParseForInfo()
}

if (Preview == null)
{
if (material.TryGetValue(out FPackageIndex parent, "Parent"))
Utils.TryGetPackageIndexExport(parent, out material);

goto texture_finding;
}

foreach (var vectorParameter in material.VectorParameterValues)
{
Expand Down
4 changes: 2 additions & 2 deletions FModel/Views/Snooper/SnimGui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,9 @@ private void DrawMaterialInspector(Dictionary<string, Texture> icons, Model mode
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);
Expand Down

0 comments on commit 995cd25

Please sign in to comment.