TSubclassOf crashes when trying to select class in blueprint editor

Hiya,
So I have set up a struct with a couple of properties. I’ve setup the the UPROPERTY, but when I make a struct in a blueprint editor, the whole editor crashes.

It crashes when ever I try and pick a class for the InventoryItemClass drop down.


#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "InventoryItemBase.h"

#include "InventoryComponent.generated.h"

USTRUCT(BlueprintType)
struct FInventorySlot
{
GENERATED_BODY()

public:

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Inventory")
TSubclassOf<AInventoryItemBase> InventoryItemClass;

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Inventory")
int32 Count;
};

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class UE_HDGAME_API UInventoryComponent : public UActorComponent
{
GENERATED_BODY()

public:

// Sets default values for this component's properties
UInventoryComponent();

// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

// Add an inventory item to players inventory. Returns the index in the inventory
UFUNCTION(BlueprintCallable, Category = "Inventory Management")
int32 AddItem(FInventorySlot InventoryItem);

// Returns an array of inventory slots
UFUNCTION(BlueprintPure, Category = "Inventory Management")
TArray<FInventorySlot> GetItems();

// Low level removes the item from the array
UFUNCTION(BlueprintCallable, Category = "Inventory Management")
void RemoveItem(int32 ItemIndex);

// Add an inventory item to players inventory
UFUNCTION(BlueprintCallable, Category = "Inventory Management")
void DropItem(int32 ItemIndex);

// Add an inventory item to players inventory
UFUNCTION(BlueprintCallable, Category = "Inventory Management")
void EquipItem(int32 ItemIndex);

protected:
// Called when the game starts
virtual void BeginPlay() override;

private:

TArray<FInventorySlot> InventoryItems;
};


So if I select a blueprint to use in the editor, I can use the “Use asset browser selection” and that works fine.
If I have a output class pin, I can plug that in and that works fine.
It’s only if I try and use the little drop down to select a class

Seems like this is an issue with the editor.
If I just create a struct in the editor, and add a member of type actor class reference (Purple one)
The same thing happens. When I try and click the drop down to select an actor class, the editor crashes