While its not always the case, sometimes you can see these things coming and plan accordingly. Take the following shop owner as one example:

Simon Coutts has run a bike shop on Robson St. for 25 years and the riots of 1994 taught him a few things.

On Wednesday morning, he boarded his store up with plywood and hired four security guards to patrol inside.

"It just looked like there were way too many people downtown the last few nights that have been playoff nights, and its been out of control," he said from outside his shop as the violence ebbed.
(article)

Being aware of what's going on and judging the risks appropriately can go a long way to being prepared for this sort of thing. For some that might mean avoiding the area altogether, for others it might just mean ensuring you are adequately prepared for a long walk home.
_________________________
Victory awaits him who has everything in order — luck, people call it. Defeat is certain for him who has neglected to take the necessary precautions in time; this is called bad luck. Roald Amundsen