banshee r4364 - in trunk/banshee: . src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4364 - in trunk/banshee: . src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying
- Date: Wed, 13 Aug 2008 01:58:06 +0000 (UTC)
Author: gburt
Date: Wed Aug 13 01:58:06 2008
New Revision: 4364
URL: http://svn.gnome.org/viewvc/banshee?rev=4364&view=rev
Log:
2008-08-12 Gabriel Burt <gabriel burt gmail com>
* src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/VideoDisplay.cs:
Fix a NRE in the cover art display when the ArtworkId for a track is null
(BGO #547520).
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/VideoDisplay.cs
Modified: trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/VideoDisplay.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/VideoDisplay.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/VideoDisplay.cs Wed Aug 13 01:58:06 2008
@@ -103,15 +103,22 @@
Gdk.Pixbuf display_pixbuf = null;
- if (track.ArtworkId == last_coverart_id) {
+ if (track.ArtworkId == last_coverart_id && last_coverart_pixbuf != null) {
display_pixbuf = last_coverart_pixbuf;
} else if (Banshee.Base.CoverArtSpec.CoverExists (track.ArtworkId)) {
if (last_coverart_pixbuf != null) {
last_coverart_pixbuf.Dispose ();
}
last_coverart_id = track.ArtworkId;
- display_pixbuf = last_coverart_pixbuf = new Gdk.Pixbuf (Banshee.Base.CoverArtSpec.GetPath (last_coverart_id));
- } else {
+ try {
+ display_pixbuf = last_coverart_pixbuf = new Gdk.Pixbuf (Banshee.Base.CoverArtSpec.GetPath (last_coverart_id));
+ } catch {
+ last_coverart_id = null;
+ display_pixbuf = null;
+ }
+ }
+
+ if (display_pixbuf == null) {
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]