The solar system seems safe because it is situated in a stable place in the home galaxy, but some theorists have entertained the possibility of the system breaking away or being consumed by a black hole. Also, scientists estimate the Milky Way will hurtle through space for about 4 billion more years before it collides with the Andromeda Galaxy, but the sun may burn out around then. The chance of a supernova devastating the solar system is low.
The "just-right" positioning of the solar system in a spiral arm of the Milky Way means the system is not in an area with a lot of stellar traffic. Thus, the chances of collisions with other large astronomical bodies or of being affected by a nearby star exploding are less than if the solar system were closer to the core of the Milky Way.
As for the possibility of a black hole consuming the solar system, scientists at Vanderbilt University concluded the threat is low unless a black hole came very close, which is unlikely. As of 2012, only one black hole has even actually been confirmed, according to The Daily Mail.
While the Milky Way and Andromeda galaxies are likely to collide and perhaps merge, collisions between stars are rare in galaxy mergers, so the solar system could be safe if it weren't about to burn out around the time of the collision. Even if the collision or merger of the two galaxies ejects the solar system, says a writer at Phyics.StackExchange.com, it may be for the best because many new hot stars form and explode quickly after galaxies collide, and that far-distant and hypothetical star supernova could spell doom for the solar system.