banshee r2949 - trunk/musicbrainz-sharp/src/MusicBrainz/MusicBrainz



Author: scottp
Date: Mon Jan  7 01:43:46 2008
New Revision: 2949
URL: http://svn.gnome.org/viewvc/banshee?rev=2949&view=rev

Log:
Added a null check.


Modified:
   trunk/musicbrainz-sharp/src/MusicBrainz/MusicBrainz/MusicBrainzObject.cs

Modified: trunk/musicbrainz-sharp/src/MusicBrainz/MusicBrainz/MusicBrainzObject.cs
==============================================================================
--- trunk/musicbrainz-sharp/src/MusicBrainz/MusicBrainz/MusicBrainzObject.cs	(original)
+++ trunk/musicbrainz-sharp/src/MusicBrainz/MusicBrainz/MusicBrainzObject.cs	Mon Jan  7 01:43:46 2008
@@ -335,6 +335,9 @@
             } catch(WebException e) {
                 response = (HttpWebResponse)e.Response;
             }
+            
+            if(responce == null)
+                throw new MusicBrainzNotFoundException();
 
             switch(response.StatusCode) {
             case HttpStatusCode.BadRequest:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]