Skip to content

Commit

Permalink
fix error on logout
Browse files Browse the repository at this point in the history
  • Loading branch information
blaxxun committed Oct 15, 2023
1 parent a7ff623 commit 3027a71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Backpacks/Backpacks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Backpacks;
public partial class Backpacks : BaseUnityPlugin
{
internal const string ModName = "Backpacks";
private const string ModVersion = "1.2.8";
private const string ModVersion = "1.2.9";
private const string ModGUID = "org.bepinex.plugins.backpacks";

internal static readonly ConfigSync configSync = new(ModName) { DisplayName = ModName, CurrentVersion = ModVersion, MinimumRequiredVersion = ModVersion };
Expand Down
2 changes: 1 addition & 1 deletion Backpacks/Visual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private static class IsItemEquiped
{
private static void Postfix(Humanoid __instance, ItemDrop.ItemData item, ref bool __result)
{
if (__instance is Player player && visuals[player.m_visEquipment].equippedBackpackItem == item)
if (__instance is Player player && visuals.TryGetValue(player.m_visEquipment, out Visual visual) && visual.equippedBackpackItem == item)
{
__result = true;
}
Expand Down

0 comments on commit 3027a71

Please sign in to comment.