She will only lose custody if she or you were to do something to put her children in harms way. People can change and you can show this to people by being on your best behavior and being a good role model to your girlfriend's children. Then no one will challenge her custody rights.
If the courts determine that having a child in the house with you is dangerous to the child she may. If you are a violent felon, rapist or child molester the courts will remove the child from the house. Other nonviolent crimes would be considered as part of the big picture.
If you are living with your girlfriend and have a criminal record, then yes, she stands a good chance of losing custody. Even if you are not living together, courts are looking to the best interests of your girlfriend's children, so if your record is brought up in court, it could affect her custody.
This depends on your record. If it was domestic violence against her or her child OR sexual assault against any woman OR child abuse against any child or sexual misconduct with a child, yes, she could lose custody if you live with her.
That all depends on what is on your record. If you have a record of abusing children in any way or battery it could be held against her. You or her could consult with a family attorney to see what the implications are and to make sure she is protected.
If your girlfriend is living with you then, yest she can lose custody because the kids would be in the same house as you. But if you do not live together then your record shouldn't affect anything unless you visit with her while the kids are there.