From 4cd20ffdaa7cd5aa5a780d3bdca682d453caf7f6 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Wed, 17 Feb 2016 18:06:30 +0000 Subject: [PATCH] Cope with receiving no images from spotify --- src/songinfo/echonestimages.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/songinfo/echonestimages.cpp b/src/songinfo/echonestimages.cpp index 08cfe4398..ce13645a8 100644 --- a/src/songinfo/echonestimages.cpp +++ b/src/songinfo/echonestimages.cpp @@ -125,7 +125,9 @@ void EchoNestImages::DoSpotifyImageRequest(const QString& id, int request_id) { return (a.second.height() * a.second.width()) < (b.second.height() * b.second.width()); }); - emit ImageReady(request_id, image_urls.last().first); + if (!image_urls.isEmpty()) { + emit ImageReady(request_id, image_urls.last().first); + } }); }