Both sentences are correct. Even when we teach our students that we don't use "which" when referring to people, the word can be used when a choice is to be made from a known set of things or people:
Compare "Which member of your family did you visit last Sunday?" and "Who did you visit last Sunday?" (it could have been anyone)