Casimir of Słupsk, grandson of King of Poland Casimir the Great, was married two times, but both his marriages were childless (so it was seemingly his fault). Say, that situation is reversed-Casimir is not sterile, he just have bad luck with wives. Also, it is not Casimir but Margaret of Mazovia dying in 1377. Casimir seek for next spouse and eventually marries Maria of Mecklenburg, who IOTL was married to his half brother Wratislaw. They have two children-Bogusław (b. 1381) and posthumous Elizabeth (b. 1383). Casimir dies in September 1382, just before Louis d'Anjou (so he would not be involved in struggle for Polish crown after death of Louis). Bogusław would take place of OTL son of his mother Eric of Pomerania and would take Scandinavian thrones (and, if he is more cimpetent than his analogue, perhaps he could save Kalmar Union?). Meanwhile...
-Sigismund of Luxembourg would not have the best genealogical claim to Polish throne (although it would have little effect, he wasn't able to enforce his claim anyway).
-daughter of Casimir of Słupsk is the best candidate to marry Vladislaus Jagiello after death of Hedwig d'Anjou. For several reasons she is better than Anna of Cili-she came from more prestigious family than mere counts of Cili, she is first cousin of King of Hungary and Pomerania has close relations with Poland, not even mentioning, that her brother is King of Denmark, Norway and Sweden. Jagiełło rather would not hestitate, and if Elizabeth is healthier than Anna and could give him sons, position of young Jagiellon Dynasty would vastly improve.
@krieger