What happens to a custody court order when the mom is granted a restraining order or protection order against the dad?

I have a court order of custody with my child’s father which states that only him and I are able to do drop offs so, if I am granted a protection or restraining order what happens to the custody order? Any ideas?