X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Flibhomescreen.cpp;h=cfd382d61c3eab5b52ff0f536b12c2c7f87cf873;hb=cac960f01705b024bf5536bf536a2a7caf9dbe99;hp=0462d4d5879d1787352010cdda569676e00c6cdf;hpb=20671799c81d1fd317ae00fc9be6968fd6b8783a;p=src%2Flibhomescreen.git diff --git a/src/libhomescreen.cpp b/src/libhomescreen.cpp index 0462d4d..cfd382d 100644 --- a/src/libhomescreen.cpp +++ b/src/libhomescreen.cpp @@ -459,7 +459,11 @@ void LibHomeScreen::on_event(void *closure, const char *event, struct afb_wsj1_m } struct json_object* ev_contents = afb_wsj1_msg_object_j(msg); - struct json_object *json_data = json_object_object_get(ev_contents, "data"); + struct json_object *json_data; + if(!json_object_object_get_ex(ev_contents, "data", &json_data)) { + HMI_ERROR("libhomescreen", "got ev_contents error."); + return; + } if(onEvent != nullptr) {