 Matthias married his first wife , Catherine of Poděbrady , in 1461 . She died in childbirth in 1464 . His second wife , Beatrice of Naples , whom he married in 1476 , was infertile . In the last decade of his life , Matthias ensured the succession of his illegitimate son , John Corvinus , to the throne of Hungary . Matthias died on 6 April 1490 . 
