diff --git a/Patches/SwapPatch.cs b/Patches/SwapPatch.cs index 328c8db..d890caf 100644 --- a/Patches/SwapPatch.cs +++ b/Patches/SwapPatch.cs @@ -491,9 +491,9 @@ namespace UIFixes [PatchPostfix] private static void Postfix(DraggedItemView __instance, ItemContextAbstractClass itemUnderCursor) { - if (SourceContainer is Component) + if (SourceContainer is Component sourceComponent) { - ItemSpecificationPanel panel = (SourceContainer as Component).GetComponentInParent(); + ItemSpecificationPanel panel = sourceComponent.GetComponentInParent(); if (panel != null) { Slot slot = SlotItemAddressSlotField.GetValue(__instance.ItemAddress) as Slot;