Don’t panic. When the condom breaks even before your ejaculate, there is a very slim chance that she could get pregnant due to your seminal fluid mixing with her vaginal juices.
So, you can ask her to take emergency contraceptive immediately and when it is taken within 72 hours, you both can avoid unwanted pregnancy.
Even when condom breaks during midnight, you can buy the emergency contraceptive next morning and ensure it is safe.
But emergency contraceptive pill should be taken before 72 hours.