Casting to spawned actor causes editor to crash

Maybe you’ve forgotten to assign EmptySlotClass a value in the blueprint. In any case, always try and remember to protect against null pointers,enclose your spawning code by a

if(EmptySlotClass){
EmptySlot = Cast<>();
} else { UE_LOG(LogTemp, Warning, TEXT("Mr Designer, please assign BP for the empty slot"))

You can checkout ensure / check macros as well, they are asserts and can prevent a crash and you can use them to logout messages to alert you of a nullptr…