Return gracefully if posts are not found

This fixes the spinner going on forever when non-existent tags are added.
This commit is contained in:
Luca Beltrame 2015-08-10 12:40:55 +02:00
parent ef46a379a0
commit 4550f54f32

View file

@ -428,6 +428,12 @@ void DanbooruService::processPostList(KJob *job)
// How many posts do we have to fetch?
if (postList.isEmpty()) {
qCDebug(LIBDANBOORU) << "No posts found";
Q_EMIT(postDownloadFinished());
return;
}
m_postsToFetch = postList.length();
for (auto element : postList) {