Me and my boyfriend were doing it and I was on top and something felt different when I lifted up the condom had slid off?

Me and my boyfriend were doing it and I was on top and something felt different when I lifted up the condom had slid off? He didn't cum but will there be a chance that I might get pregnant? If so what can I take to prevent it? Please help really nervous and can not have a baby about to start college