[rhythmbox] fix warnings introduced by commit d057ec2685440a130d9f732fe1de8e8d4601f7a9



commit 6bb85d4920e05356f90b0ef41045e5726920fc35
Author: Jamie Nicol <jamie thenicols net>
Date:   Thu Aug 12 02:43:33 2010 +0100

    fix warnings introduced by commit d057ec2685440a130d9f732fe1de8e8d4601f7a9
    
    check if image is not null before checking width of image.

 .../rb-audioscrobbler-profile-source.c             |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-profile-source.c b/plugins/audioscrobbler/rb-audioscrobbler-profile-source.c
index 31b3317..a8d637e 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-profile-source.c
+++ b/plugins/audioscrobbler/rb-audioscrobbler-profile-source.c
@@ -1467,11 +1467,13 @@ set_user_list (RBAudioscrobblerProfileSource *source,
 		max_image_width = 0;
 		for (i = 0; i < list_data->len; i++) {
 			RBAudioscrobblerUserData *data;
-			int width;
 
 			data = g_ptr_array_index (list_data, i);
-			width = gdk_pixbuf_get_width (data->image);
-			max_image_width = MAX (max_image_width, width);
+			if (data->image != NULL) {
+				int width = gdk_pixbuf_get_width (data->image);
+				max_image_width = MAX (max_image_width, width);
+			}
+
 		}
 
 		/* add a new button for each item in the list */



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