How do i set the skeletal mesh of a SkeletalMeshComponent at runtime?

Hello, i have a class AMyActor that has a SkeletalMeshComponent as the RootComponent. My issue is that i only know what Skeletal Mesh to use when the player selects from different skeletal meshes in the map. If he selects a certain skeletal mesh i want the SkeletonMeshComponent from AMyActor to also use that selected Skeletal Mesh. I tried doing:

void AMyPlayer::OnSelectedActorFromWorld(class ASelectActor * SelectActor)
{
        MyActorInstance->SetSkeletalMesh(SelectActor->GetSkeletalMesh());
}

void AMyActor::SetSkeletalMesh(USkeletalMesh * SkeletalMesh)
{
	SkeletalMeshComponent->SkeletalMesh = SkeletalMesh;
}

But he doesn’t do anything, am i missing something?

Just did:

SkeletalMeshComponent->SetSkeletalMesh(SkeletalMesh);

and it works !