Don't set album art from pixbuf if pixbuf is None

This commit is contained in:
Bryan Schumaker 2010-11-03 20:44:18 -04:00
parent ca46e8db4c
commit 0c3acb92d2
1 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,8 @@ class Image(gtk.Image):
new_w = (float(w) / float(h)) * new_h
if new_w > 0 and new_h > 0:
buf = buf.scale_simple(int(new_w), int(new_h), gtk.gdk.INTERP_HYPER)
self.set_from_pixbuf(buf)
if buf != None:
self.set_from_pixbuf(buf)
class AlbumArt(Image):