summaryrefslogtreecommitdiff
path: root/Applications/ChanViewer
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-04 22:11:50 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-04 22:11:50 +0200
commit103c2749ce8f6d519b552881657fb3c60a615ff6 (patch)
tree6de6b3401a441ab4b2e9027dbea25d0c4dd29de0 /Applications/ChanViewer
parent54ed6a888d442c1998cdaa0a68b27d3f99b549e6 (diff)
downloadserenity-103c2749ce8f6d519b552881657fb3c60a615ff6.zip
ChanViewer: If catalog download fails, don't try to parse response JSON
Diffstat (limited to 'Applications/ChanViewer')
-rw-r--r--Applications/ChanViewer/ThreadCatalogModel.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Applications/ChanViewer/ThreadCatalogModel.cpp b/Applications/ChanViewer/ThreadCatalogModel.cpp
index e3245b571e..328a3f8e98 100644
--- a/Applications/ChanViewer/ThreadCatalogModel.cpp
+++ b/Applications/ChanViewer/ThreadCatalogModel.cpp
@@ -26,8 +26,12 @@ void ThreadCatalogModel::update()
job->on_finish = [job, this](bool success) {
auto* response = job->response();
- dbg() << "job finished! success=" << success << ", response=" << response;
- dbg() << "payload size: " << response->payload().size();
+ dbg() << "Catalog download finished, success=" << success << ", response=" << response;
+
+ if (!success)
+ return;
+
+ dbg() << "Catalog payload size: " << response->payload().size();
auto json = JsonValue::from_string(response->payload());