Small security check.

This commit is contained in:
Ottermandias 2023-01-05 15:57:18 +01:00
parent 2f7b6e3d55
commit c684db3000

View file

@ -652,7 +652,7 @@ public class ItemSwapWindow : IDisposable
return; return;
} }
UpdateMod( _mod, newCollection.Settings[ _mod.Index ] ); UpdateMod( _mod, _mod.Index < newCollection.Settings.Count ? newCollection.Settings[ _mod.Index ] : null );
newCollection.ModSettingChanged += OnSettingChange; newCollection.ModSettingChanged += OnSettingChange;
if( oldCollection != null ) if( oldCollection != null )
{ {