Get USkeletalMesh * from USkinnedMeshComponent

In USkinnedMeshComponent, it stores a pointer to a USkeletalMesh. The pointer is private, but it is exposed to Blueprint as read only. I went to the Blueprint Editor, and I was able to create a Blueprint node to get a reference to the Skeletal Mesh that is stored in a USkinnedMeshComponent (really a UPoseableMeshComponent). What I want to do is get the pointer to this USkeletalMesh in my C++ code. There is a setter for the USkeletalMesh, but no getter. Perhaps I can figure out a way to create a Blueprint function that gets the reference to the Skeletal Mesh, and call that function from C++, but I don’t know if that’s even possible.

So how can I get the USkeletalMesh pointer from the USkinnedMeshComponent, in C++?

It doesn’t use a getter:

USkeletalMesh *MyMesh = GetMesh()->SkeletalMesh;

Thank you!