Answer
Charles XV did have legitimate children – a son and a daughter. His son, Oscar II, was the next in the line of succession and successfully succeeded Charles XV to the throne. However, due to the absence of further legitimate heirs from Charles XV, the Bernadotte dynasty in Sweden ended with the reign of Oscar II.