aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 7840326..48d3689 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -1059,9 +1059,11 @@ namespace QuickMedia {
} else {
page_loop(std::move(new_tabs));
tabs[selected_tab].page->on_navigate_to_page();
- const Json::Value &chapters_json = content_storage_json["chapters"];
- if(chapters_json.isObject())
- json_chapters = &chapters_json;
+ if(content_storage_json.isObject()) {
+ const Json::Value &chapters_json = content_storage_json["chapters"];
+ if(chapters_json.isObject())
+ json_chapters = &chapters_json;
+ }
}
} else {
// TODO: Show the exact cause of error (get error message from curl).