Update SAVEditor.cs

This commit is contained in:
Kurt 2024-03-09 20:28:50 -06:00
parent 30d85c95a0
commit a143c9a2ab

View file

@ -170,11 +170,13 @@ public partial class SAVEditor : UserControl, ISlotViewer<PictureBox>, ISaveFile
public int GetViewIndex(ISlotInfo slot)
{
if (GetCurrentDaycare() is not { })
if (GetCurrentDaycare() is not { } dc)
return -1;
for (int i = 0; i < SlotPictureBoxes.Count; i++)
{
if (dc.DaycareSlotCount == i)
break;
var data = GetSlotData(i);
if (data.Equals(slot))
return i;