Yikes. I'd probably pee myself if that happened to me haha.
I was taught emergency dismounts when I was younger but there's a big difference between emergency dismount at the trot and at a gallop
My QH gelding decided he had enough of being in the back (we fought the entire trail ride. I like the back and he likes to be in the front). Well, he randomly took off at a full gallop. I tried turning his head and everything to get him to stop but considering how strong and stubborn he is he broke through each of my attempts and kept going. When we were about to enter the woods, I just dropped my stirrups and leapt off because I wasn't about to have my face, arms, and legs whacked my branches. I landed in some leaves and sprained my ankle (I have weak ankles, as is).
Fun stuff :/