Plugin Developpement Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 758]

Hi, So I’m currently developping a plugin for unreal right now. In my plugin, I can item to a list made with slate. The issue is when I’m removing more then 3 items (sometimes 2) in a row, I get this error : Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 758]

I saw people had the issue while using UE for game dev and especially with skeleton mesh but here, I don’t have anything like that and the crash occurs when using the plugin.

To remove an item, here’s what I do :

//Create new preset object
	FPreset* Preset = new FPreset();
	//Add preset to list
	int Index = PresetList->Add(*Preset);
	//Add slot in configuration form
	PropertyConfigFormContainer->AddSlot()
	.Padding(0, 0.0f, 0.0f, 5.0f)
	[
		SNew(SPresetConfigurationWidget)
		.PresetData(Preset)
		.Controls(ControlList)
		.OnRemove_Lambda([this, Index](TSharedRef<SWidget> FormWidget) {
			// Remove item in preset list
			PresetList->RemoveAt(Index);
			// Remove widget
			PropertyConfigFormContainer->RemoveSlot(FormWidget);
		})
	];

I don’t get why this only occurs after deleting a few in a row. Also, if a remove an item and close the panel them reopen it to remove more items, this works perfectly fines.

Any help would be appreciated, thank you in advance !