According to the New York Daily News, the legendary comedienne’s personal doctor took a quick break while Rivers was under anesthesia during an Aug. 28 procedure — to grab a selfie with the star. CNN reports the snap happened just before Rivers went into cardiac arrest — the first in a series of events that would ultimately lead to her death a few days later.

The doctor, who has not yet been named publicly by investigators, is already under fire for taking over during Rivers’ routine throat procedure at an outpatient endoscopy clinic in New York. Reports say the doctor wasn’t authorized to practice at the private facility and that, after seeing something suspicious on Rivers’ vocal cords that might have been a cancerous mass, he elected to perform an unplanned biopsy at the clinic that would have been much safer had it been performed in a hospital.

“He asked and they let him, a huge no-no,” a source said. “A biopsy like that should only be done in a hospital setting,” because a hospital would have been better equipped to handle the complications that occurred, the source added. Investigation into the event has shown that Rivers’ vocal cords shut down during the biopsy, which cut off her ability to breathe and ultimately caused her heart to stop.

Rivers’ procedure was being performed by Dr. Lawrence Cohen before her personal doctor took over. Cohen has since been let go from the clinic, the Daily News reports.