This is always a fear of mine when out on the bike -- in a car it's bad but on a bike it's a disaster.
I've had a couple of near misses including one where I drove up the pavement to avoid a car that ended up stopping in the middle of the road junc -- instead of behind me or the traffic lights.