GrayJumba / lastfm-sharp

Automatically exported from code.google.com/p/lastfm-sharp
GNU General Public License v3.0
0 stars 0 forks source link

artist.GetTopAlbums() - Nullreference Exception #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
public void GetAllAlbums(string Artist)
{
            ArtistSearch art = new ArtistSearch(Artist, session);
            Artist artist = art.GetFirstMatch();

            TopAlbum[] albums;

            try 
            {
                artist.GetTopTracks();
                albums = artist.GetTopAlbums();
            } 
            catch (Exception e) 
            {
                Console.WriteLine(e.Message);
                return;
            }

            foreach (TopAlbum album in albums)
                Console.WriteLine(album.Item);
}

The same piece of code worked fine yesterday, today it throws a 
NullReferenceException. Other methods like GetTopTracks() is working fine.

Original issue reported on code.google.com by Fanatic....@gmail.com on 12 Jul 2012 at 12:43