[banshee/gio-hardware] [TrackActions] Prevent crash in search-for-same
- From: Alex Launi <alexlauni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/gio-hardware] [TrackActions] Prevent crash in search-for-same
- Date: Fri, 13 Aug 2010 15:27:24 +0000 (UTC)
commit 5904fa88ecff3d3fbbb75f98f225ebcd5617e426
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Aug 12 18:03:54 2010 -0700
[TrackActions] Prevent crash in search-for-same
Specifically, when artist/album are blank/null. Fixes bgo#626786.
.../Banshee.Gui/TrackActions.cs | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs b/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs
index 0f369d4..4f68208 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs
@@ -496,7 +496,9 @@ namespace Banshee.Gui
{
if (current_source != null) {
foreach (TrackInfo track in current_source.TrackModel.SelectedItems) {
- ActiveSource.FilterQuery = BansheeQuery.ArtistField.ToTermString (":", track.ArtistName);
+ if (!String.IsNullOrEmpty (track.ArtistName)) {
+ ActiveSource.FilterQuery = BansheeQuery.ArtistField.ToTermString (":", track.ArtistName);
+ }
break;
}
}
@@ -506,7 +508,9 @@ namespace Banshee.Gui
{
if (current_source != null) {
foreach (TrackInfo track in current_source.TrackModel.SelectedItems) {
- ActiveSource.FilterQuery = BansheeQuery.AlbumField.ToTermString (":", track.AlbumTitle);
+ if (!String.IsNullOrEmpty (track.AlbumTitle)) {
+ ActiveSource.FilterQuery = BansheeQuery.AlbumField.ToTermString (":", track.AlbumTitle);
+ }
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]