[banshee] [Lastfm] Fix NRE in LastfmRequest when the request times out



commit 76282b3c4fc059377e77ccdb45cc092d4957ed4b
Author: Olivier Dufour <olivier duff gmail com>
Date:   Sat Oct 16 17:55:44 2010 +0200

    [Lastfm] Fix NRE in LastfmRequest when the request times out
    
    Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>

 src/Libraries/Lastfm/Lastfm/LastfmRequest.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs b/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs
index d6ef77c..f298021 100644
--- a/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs
+++ b/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs
@@ -239,7 +239,7 @@ namespace Lastfm
                 Log.DebugException (e);
                 response = (HttpWebResponse)e.Response;
             }
-            return response.GetResponseStream ();
+            return response != null ? response.GetResponseStream () : null;
         }
 
         private Stream Post (string uri, string data)
@@ -259,7 +259,7 @@ namespace Lastfm
                 Log.DebugException (e);
                 response = (HttpWebResponse)e.Response;
             }
-            return response.GetResponseStream ();
+            return response != null ? response.GetResponseStream () : null;
         }
 
 #endregion



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