In the Game of Thrones S02E09 Battle of the Blackwater Ser Ilyn Pane was in the women's room bodyguarding them. Though the Queen claims Ser Ilyn was present to protect them and to deal with potential betrayers, she later admited to Sansa that Ilyn's true purpose was to execute her and Sansa, and possibly the rest of the ladies who would have taken refuge in the holdfast, should Stannis Baratheon take the city.
Now there are two question
- Why Ilyn was there to kill them if war went wrong way?
- Why didn't he stop Cersei or Sansa when they went out of the room?