snowl / LegendaryClient

Custom League of Legends client. No longer in development.
MIT License
43 stars 30 forks source link

Crash if player is unranked #28

Closed uns211 closed 10 years ago

uns211 commented 10 years ago

If a player is unranked, the client crashes here: https://github.com/Snowl/LegendaryClient/blob/master/LegendaryClient/Windows/MainPage.xaml.cs#L154

I made a quick edit to get it working

if (InPromo)
{
     PlayerCurrentProgressLabel.Content = CurrentLP;
     PlayerProgressBar.Value = 100;
}
else
{
     if (CurrentLP != "")
     {
          PlayerCurrentProgressLabel.Content = CurrentLP + "LP";
          PlayerProgressBar.Value = Convert.ToInt32(CurrentLP);
     }
}
snowl commented 10 years ago

Will be fixed in the next update.

Instead of that fix, do

                else
                {
                    PlayerProgressBar.Value = 100;
                    PlayerProgressLabel.Content = "Level 30";
                    PlayerCurrentProgressLabel.Content = "";
                    PlayerAimProgressLabel.Content = "";
                    return;
                }
snowl commented 10 years ago

Fixed in ac07ca0757648a092a486cbc6ad2a7b978f6d5d4