Safety First! when re-stringing your guitar
Well it's happened to us and this is what we now do about it.
Before you start any re-stringing work, get a pad of yellow "Post-It" notes, the larger ones about 3inches square are best. Take about 15 in one block and using the glue on the bottom one stick the whole block down neatly behind the bridge.
Then remove and replace strings as normal. If one of them does fly loose in this process then its force is absorbed by the Post It notes and so avoids or at least reduces damage caused. The block of Post It notes is very easily removed from the guitar and can be used as normal.
There are products you can buy which can help too
Kling-On Classical Guitar Top Protector and Kling-On Ultra Top Protector;
Rosette Bridge Bone Beads and Rosette Tie Guard
(An alternative method I previously used was to get some masking tape (pressure sensitive tape). Old or low quality tape where the tape is losing its adhesion is best. If you have new tape, then take a strip a few centimetres longer than the width of the tie holes in the bridge, and press it onto the back or your hand, remove it and repeat a few times. The stickyness reduces. Do not attach any tape to your instrument until you are positive that it is not so sticky that it is going to lift the laquer/varnish when you remove it. When you are completely confident, put the tape onto the soundboard immediately behind the bridge. You don't need to press it down hard, it only has to support its own weight.
(Thanks to Ed O'Grady for his suggestions).