Let's think about this.
Cercei knew that Jon Arryn and Ned Stark were investigating the true parentage of her children and eventually discovered that she screwed her twin brother behind King Robert's back. So shortly before Ned confronted her, she came up with the idea of convincing her cousin (whom she's also be screwing) to give Robert a strong wine so that he'll be killed while hunting.
What if the boar didn't kill Robert?
What if it had ran away or missed and Robert wasn't mortally wounded? What was Cercei's plan then? It appears as though Cercei's plan relied on Robert dying so that she could secure Joffrey's place on the throne (With convenient and timely help from Baelish). But if King Robert doesn't die, then she's stuck in place.
So lets say that Robert comes back from his hunt, pissed about missing a prize boar and unaware of his wife's clumsy plan to kill him. Then his noble and honorable Foster brother and Hand of the King, a man who has never been untrue or lied, informs him that his kids are born from incest based on strong evidence from genealogical books, Cercei's own confession to Ned, and how Robert's bastards are the splitting image of his youth yet his own children look nothing like him.
What would he do to Cercei and the children? That's kind of obvious though there's a chance that Ned would persuade him otherwise. For instance, allow Joffrey to still inherit Casterly Rock since he's heir to Lannister lands.
Who would succeed him in place of Joffrey? Would he inform Stannis that he is the true heir or legitimize one of his bastards like Edric or Gendry?
How would he deal with the rest of the Lannisters? Does he kill Jamie and strip Tywin of all lands and join the Crown's forces to those of Tully and Stark?
What would Baelish do to ensure that chaos still stirs? Secretly poison Robert amidst his attempts to regain control of his court? Implicate the Barratheons against the Starks?