[banshee/stable-1.6] [ColumnCellAlbum] Fix invalid cast crash
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-1.6] [ColumnCellAlbum] Fix invalid cast crash
- Date: Sun, 25 Apr 2010 23:12:43 +0000 (UTC)
commit 7b00c377a30e6709d8c1f964ff6513fc5a24ece2
Author: Gabriel Burt <gabriel burt gmail com>
Date: Sun Apr 25 13:29:15 2010 -0700
[ColumnCellAlbum] Fix invalid cast crash
Right clicking on a podcast would invoke the ColumnCellAlbumAccessible
ctor for some reason, which would crash (bgo#615396)
.../Banshee.Collection.Gui/ColumnCellAlbum.cs | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
index d7ec9e9..bbae65e 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
@@ -60,10 +60,12 @@ namespace Banshee.Collection.Gui
public ColumnCellAlbumAccessible (object bound_object, ColumnCellAlbum cell, ICellAccessibleParent parent)
: base (bound_object, cell as ColumnCell, parent)
{
- AlbumInfo bound_album_info = (AlbumInfo)bound_object;
- Name = String.Format ("{0} - {1}",
- bound_album_info.DisplayTitle,
- bound_album_info.DisplayArtistName);
+ var bound_album_info = bound_object as AlbumInfo;
+ if (bound_album_info != null) {
+ Name = String.Format ("{0} - {1}",
+ bound_album_info.DisplayTitle,
+ bound_album_info.DisplayArtistName);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]