What happens if you haven’t had your rhogam shot yet and go into labour?

If you require the rhogam shot but haven’t had it yet and go into labour early what happens? Is it dangerous? Can they give it to you at the hospital right then?