Starcrash

This article's plot summary may be too long or excessively detailed. Please help improve it by removing unnecessary details and making it more concise. (November 2015) (Learn how and when to remove this template message)
In a distant galaxy, a starship searches for the evil Count Zarth Arn. Closing in on a planet, the ship is attacked by a mysterious weapon (a red blobby field) which drives the crew insane. Three escape pods launch during the attack, but the ship crashes into the atmosphere of the planet and is destroyed.
Meanwhile, smuggler Stella Star and her sidekick Akton run into the Imperial Space Police, led by robot sheriff Elle. Akton and Stella escape by jumping into hyperspace. When they emerge, they discover an escape pod from the attacked starship, and in it, a sole survivor. Before they can escape, they are apprehended by the police, who tracked their hyperspace trail.
Tried and convicted of piracy, they are each sentenced to life in prison on separate prison planets. When a riot breaks out at Stella's prison, she uses the diversion to escape the prison, which explodes shortly afterwards. Police Chief Thor recaptures her and she is taken to an orbiting ship, where she is reunited with Akton. They are contacted holographically by the Emperor of the Galaxy, who thanks them for recovering the starship survivor. They are offered clemency if they help find three more missing escape pods, one of which may contain the Emperor's only son.
The Emperor is in a feud with Count Zarth Arn, who has a secret weapon hidden away on a planet somewhere. The weapon has immense power, and he can use it to take over the galaxy. The Emperor orders Stella and Akton to find the Count's weapon, and find and rescue his son. With Chief Thor and Elle accompanying them, Stella and Akton set off on their quest.
They have a long way to travel, but Stella excitedly notes that hyperspace can make a journey that would've taken two months take only two hours. They quickly arrive at the location Akton computes for the first escape pod.
Stella and Elle take a shuttle from the spaceship and land near the pod on a sandy, rocky beach. There are no living survivors. Stella meets an amazonian warrior tribe and is escorted to their underground fortress. On arrival, Elle is ambushed, shot and left for dead, and Stella is taken captive. Stella is taken before Corelia, Queen of the Amazons, who is in league with Zarth Arn. Elle doesn't actually die, and he makes his way to the throne room, taking Corelia hostage to secure Stella's release. They escape, but the queen mentally activates a giant female robot which chases them. Things look dire until the pair are rescued by Akton and Thor, in the spaceship.
On a desolate and uninhabited snow-covered frozen planet, Stella and Elle investigate the second escape pod crash site, but as with the first crash site, they find no survivors. Upon their return to the ship, Thor, who has ambushed and apparently knocked out Akton, reveals that he is an agent of Zarth Arn, and will shortly join him as his Prince of Darkness. Thor locks Stella and Elle outside on this planet where the temperature drops "thousands of degrees" at night, where he knows they will freeze to death. Elle and Stella lie down to freeze, and Elle takes Stella's hand so he can keep her heart going in "suspended animation".
Akton revives himself and battles Thor. Thor gains the upper hand and tries to crush Akton, but Akton's powers suddenly escalate, and he repels Thor's attack and absorbs blaster fire seemingly without effort, to Thor's considerable disbelief. Akton reflects Thor's final laser shots back towards him with his hand, killing him. But the sun has already set, and the planet's surface is frozen solid. When morning comes, Akton brings Elle and frozen Stella back onto the ship, where he uses his powers to thaw her out.
On the planet of the third escape pod, Stella and Elle are attacked by barbarian tribesmen who smash Elle to pieces and abduct Stella. She escapes and flees to a nearby cave where she is attacked by more tribesmen, but a man in a golden mask arrives, firing lasers through his eyes, and rescues her. He is revealed to be the Emperor's son, Simon. Akton arrives and starts a laser sword duel with Simon, unaware of his identity. Simon proves his relation to the Emperor and the trio set off to find the Count's secret weapon.
Arriving at an underground laboratory, the three are captured by the guards. The Count appears and reveals his plan to use them as bait to bring the Emperor to the planet, and then have his weapon self-destruct, destroying the planet, the Emperor, and all of them. He leaves to conquer the Emperor's home world, ordering his two robot golems to keep the group there. Akton engages them in a laser sword duel, and the trio eventually defeat the robots, but Akton is mortally wounded. He says goodbye, and vanishes in a plume of electrical fuzz. The Emperor arrives at the planet. He is aware that the whole thing is mined with nuclear bombs as a trap, and that they are out of time. He quips that one doesn't get to be Emperor without getting some perks, and uses a green ray from his flagship to "stop time" for three minutes, giving them all enough time to escape. The flagship pulls away as the planet explodes behind it.
Stella stands with the Emperor on his flagship, as a huge battle commences between his armada and the Count's space station. The Count also attacks the Emperor's homeworld, but the attack is a failure. The Emperor's soldiers storm the space station, but after a pitched battle they are stopped short and killed by the Count's reinforcements.
With no option left, the Emperor decides to ram his flagship into the Count's space station, destroying them both. But Elle has been salvaged and rebuilt by the Emperor's men, and Stella and Elle volunteer to commandeer an evacuated space station, the Floating City, and to smash it into the Count's station. They fly the city towards the space station, and manage to escape together just as their station crashes into the Count's, finally winning the war.
Stella and Elle are picked up by the Emperor's son, Simon. He is happy Stella survived and asks her to marry him.

Question: What happens that allows Stella to temporarily escape prison?
Answer: A riot breaks out