Do you remember when Viserys named Rhaenyra his heir to keep Daemon from the throne? Do you remember when that was considered a breach of Andal law? Neither do I.
As King Viserys had no living son, Daemon regarded himself as the rightful heir to the Iron Throne, and coveted the title Prince of Dragonstone, which His Grace refused to grant him…but by the end of year 105 AC, he was known to his friends as the Prince of the City and to the smallfolk as Lord Flea Bottom. Though the king did not wish
Daemon to succeed him, he remained fond of his younger brother, and was quick to forgive his many offenses. - f&b
Some said that Daemon’s support for his brother in the Great Council was motivated by the belief he would be his brother’s heir. But in Viserys’s mind, he already had an heir: Rhaenyra, his sole daughter by his cousin, Queen Aemma of House Arryn. - twoiaf
“He is no lord,” Alys said scornfully. “My brother Harry is the rightful lord, and by law I am his heir. A daughter comes before an uncle. Uncle Arnolf is only castellan.. ” - adwd
To rectify these ills, King Jaehaerys in 52 AC promulgated the Widow’s Law, reaffirming the right of the eldest son (or eldest daughter, where there was no son) to inherit, but requiring said heirs to maintain surviving widows in the same condition they had enjoyed before their husband’s death [...]. The same law, however, also forbade men from disinheriting their children by a first wife in order to bestow their lands, seat, or property upon a later wife or her own children. - f&b