When to leave during pregnancy

Is it wrong of me to want to leave my baby’s father? When he gets drunk he always threatens me and tells at me and I dont want it to stress the baby out. He says he wants to be in the baby’s life but i dont think it’s a safe situation.