this was the first time that we did it unsafe and im worried that i might be pregnant if i am is there a way to stop it from happening?

my boyfriend and i were mucking around the other day and we had sex and it wasnt safe would i still be pregnant even though he didnt cum inside me?