Mountain climbers think
a lot about what would happen if they took a wrong step or fell down. They spend a lot of time training for it, they spend a lot of money on equipment in preparation for it, and they spend a lot of effort setting up backup systems. When a mountain climber goes out on a glacier they typically do not go alone, with minimal equipment. They go in a team, each person wearing a harness and roped together. They each have an ice ax and have trained in self-arrest on snow and ice. If one person were to fall they have been trained to arrest themselves and save the faller by means of the rope. They may have practiced this many times. If one climber were to fall into a crevasse they will arrest, set up anchors, and set up a rescue system (using pulleys and extra gear that they have brought). Meanwhile, if the climber in the crevasse is still conscious he or she will attempt to do what they can to aid in their own rescue (up to and including ascending the rope). And this is just a small part of the training and preparation that experienced mountaineers take on when they set out to climb a mountain.
It does nevertheless take a good deal of courage and determination to work your way up a glaciated mountain, but the idea that there is no safety net or that the climbers do not think what will happen if things go bad is very misleading. It is perhaps the single most pressing topic of thought for any mountaineer.