There is a chance that the precum on the condom could transmit something, but it's pretty low, given that he probably flipped it over quickly. If he had any infections, there probably wouldn't be enough virus or bacteria to transmit.
When he was sitting on your penis, what parts of you were touching? Did his anus touch your penis? Was there rubbing or did he sit pretty still while trying to put the condom on?
I ask because infections like herpes, HPV and syphilis are transmitted by skin-to-skin contact (genital to genital, genital to anal, mouth to genital or anal), but they need some friction in order to transmit. Syphilis requires a sore to be present in order to transmit, but herpes and HPV can transmit without any symptoms present.
All in all, this sounds like a low-risk encounter, and the risk may go up a bit if there was some rubbing.