From c4ab196719e99e6ab9e323175124cf1d9aafa36e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 9 Aug 2019 22:00:08 +0200 Subject: Next video in list to play should be next in playlist (if available) --- src/VideoPlayer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/VideoPlayer.cpp') diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp index 65bbb67..96b9ee2 100644 --- a/src/VideoPlayer.cpp +++ b/src/VideoPlayer.cpp @@ -165,8 +165,6 @@ namespace QuickMedia { VideoPlayer::Error VideoPlayer::read_ipc_func() { assert(connected_to_ipc); - assert(event_callback); - Json::Value json_root; Json::CharReaderBuilder json_builder; std::unique_ptr json_reader(json_builder.newCharReader()); @@ -189,7 +187,7 @@ namespace QuickMedia { if(json_reader->parse(buffer + start, buffer + i, &json_root, &json_errors)) { const Json::Value &event = json_root["event"]; const Json::Value &request_id_json = json_root["request_id"]; - if(event.isString()) + if(event.isString() && event_callback) event_callback(event.asCString()); else if(expected_request_id != 0 && request_id_json.isNumeric() && request_id_json.asUInt() == expected_request_id) { request_response_data = json_root["data"]; -- cgit v1.2.3