From c7b0c0280076b40409ddf13af4e520f9fc8cff50 Mon Sep 17 00:00:00 2001 From: Arnaud Bienner Date: Sun, 12 Jan 2014 21:25:53 +0100 Subject: [PATCH] Sanity check --- src/ui/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 387276150..3477743a1 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -1691,7 +1691,10 @@ void MainWindow::ShowInLibrary() { break; } } - QString search = "artist:"+songs[0].artist()+" album:"+songs[0].album(); + QString search; + if (!songs.isEmpty()) { + search = "artist:" + songs.first().artist() + " album:" + songs.first().album(); + } library_view_->filter()->ShowInLibrary(search); }