In 1343 Robert I the Sage, King of Naples, died. His only son, Charles of Calabria, had died in 1328, leaving two daughters, one of which, Joan, had been married to Andrew, son of king Charles I of Hungary. During his time in Naples, Andrew's more refined wife developed a fierce hostility towards him. After her father's death, she received from the Avignonese Pope Clement VI the official investment of the Kingdom, which was then nominally a vassal of the Papal States. Andrew, who also sought the crown, received only the title of Duke of Calabria. On June 14, 1345 Clement, after a payment of 44,000 marks, agreed to yield to Andrew the title of king, but only as heir in case of Joan's death. Joan, who was suspecred of having an affair with Louis of Taranto, was at the time under the strong influence of the latter's mother, Catherine of Valois. On September 19, the day before the investiture of Andrew as King, a conjure led by Catherine's relatives and courtesans had Andrew assassinated during a hunt at Aversa. Bertramo del Balzo, together with Fra Moriale, from the Hospitallers, discovered and punished the assassins, but suspicion of the queen's involvement in the assassination had already become widespread. In May 1346 Andrew's brother, King Louis of Hungary, sent envoys to Clement to ask for her deposition. Unsatisfied by the Pope's reply, he mustered an army, planning to embark his troops in Zara. However, at the time the maritime city had rebelled against the Venetians, whose ships were blockading its port. After a failed attempt to free it, the King had to postpone his expedition, while Zara returned under Venice's aegis.
Question: What was contingent upon Andrew becoming king?
Answer: Joan's death