rhythmbox r5991 - in trunk: . plugins/audioscrobbler



Author: jmatthew
Date: Mon Oct 20 21:51:49 2008
New Revision: 5991
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5991&view=rev

Log:
2008-10-21  Jonathan Matthew  <jonathan d14n org>

	* plugins/audioscrobbler/rb-lastfm-source.c:
	(handle_playlist_response), (handle_xmlrpc_response):
	Don't crash on failed xmlrpc and playlist requests.  Fixes #556551.


Modified:
   trunk/ChangeLog
   trunk/plugins/audioscrobbler/rb-lastfm-source.c

Modified: trunk/plugins/audioscrobbler/rb-lastfm-source.c
==============================================================================
--- trunk/plugins/audioscrobbler/rb-lastfm-source.c	(original)
+++ trunk/plugins/audioscrobbler/rb-lastfm-source.c	Mon Oct 20 21:51:49 2008
@@ -2132,6 +2132,11 @@
 	gboolean ret = FALSE;
 	time_t now;
 	GValue value = {0,};
+
+	if (body == NULL) {
+		rb_debug ("didn't get a response");
+		return FALSE;
+	}
 	
 	/* until totem-pl-parser can parse playlists from in-memory data, we save it to a
 	 * temporary file.
@@ -2294,6 +2299,11 @@
 	GError *error = NULL;
 	GValue v = {0,};
 
+	if (body == NULL) {
+		rb_debug ("didn't get a response to an xmlrpc request");
+		return;
+	}
+
 	soup_xmlrpc_parse_method_response (body, strlen (body), &v, &error);
 	if (error != NULL) {
 		rb_debug ("got error in xmlrpc response: %s", error->message);



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