Cope with receiving no images from spotify

This commit is contained in:
John Maguire 2016-02-17 18:06:30 +00:00
parent 52c72f95ba
commit 4cd20ffdaa
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}
});
}