[banshee/stable-1.8] [Lastfm] Fix NRE in LastfmRequest when the request times out
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-1.8] [Lastfm] Fix NRE in LastfmRequest when the request times out
- Date: Sun, 16 Jan 2011 18:37:35 +0000 (UTC)
commit 20154406bd26c2eeae6cdb5932053504dbbcf4db
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]