BuildFromStaticMeshDescriptions crashes

I have this code:

	UStaticMesh* mesh = staticMeshComponent->GetStaticMesh();
	meshDescription = mesh->CreateStaticMeshDescription();

	//generate the tiles
	uint32 numTiles = sizeX * sizeY;
	uint32 x = 0, y = 0;
	/*for (uint32 index = 0; index < numTiles; index++) {
		FVector2D coords = GetCoordsFromIndex(index);
		ModifyTile(x, y, TArray<uint32>({ 0, 0, 0, 0 }));

	//build the static mesh from the mesh description
	FStaticMeshLODResources LOD;
	TArray<UStaticMeshDescription*> meshDescriptions({ meshDescription });

The code crashes at BuildFromStaticMeshDescriptions i.e. the typical access violation error. I’ve made sure to expose the staticMeshComponent to the blueprint so mesh is not null. Do you have any hint on what could cause the crash?