[banshee] Lastfm: Fix NRE crash (bgo#647024)



commit 36e3e94456721ebad9159bff3b1c575c103f9681
Author: Olivier Dufour <olivier duff gmail com>
Date:   Tue Apr 26 14:16:44 2011 -0500

    Lastfm: Fix NRE crash (bgo#647024)
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>

 src/Libraries/Lastfm/Lastfm/LastfmRequest.cs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs b/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs
index f298021..7867be8 100644
--- a/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs
+++ b/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs
@@ -114,6 +114,9 @@ namespace Lastfm
 
         public JsonObject GetResponseObject ()
         {
+            if (response_stream == null)
+                return null;
+
             Deserializer deserializer = new Deserializer (response_stream);
             object obj = deserializer.Deserialize ();
             JsonObject json_obj = obj as Hyena.Json.JsonObject;



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