You will likely be fine if you and your partner practiced safe sex. But remember, anytime you have sex you may be exposed to STIs. If you used a male or female condom, your risks are less, but still there.
Safe sex is important ALL the time. When a girl is on her period, sexually transmitted infections such as HIV and Hepatitis (that are carried in the blood) are spread especially easily through contact with infected blood.
Also, when a girl is menstruating, she has a higher risk for developing pelvic inflammatory disease (PID) from gonorrhea or Chlamydia infections.
One last thing… Don’t take for granted that your girlfriend won’t get pregnant while she is on her period. It’s still possible, unless she is using birth control pills or another effective hormone method.
Always practice safe sex!