Movie executives know that they're taking a big risk any time they make a movie — even if it has an all-star cast. That risk, of course, is the possibility that the movie might bomb at the box office.
Still, even when a movie completely flops, actors still get paid. In fact, they often get paid a surprising amount, given the failure of the movie they were in.