summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-09-18 16:48:41 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-09-18 16:50:55 +0800
commitcac960f01705b024bf5536bf536a2a7caf9dbe99 (patch)
tree70e777b4bae56109f203f5fca847ab6cdf662159
parent20671799c81d1fd317ae00fc9be6968fd6b8783a (diff)
Remove compile warningguppy_6.90.0guppy/6.90.06.90.0
change from deprecated function 'json_object_object_get' to 'json_object_object_get_ex'. Change-Id: I3ae6f1e39d1f05033568662bff9a2a35e2da5879 Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
-rw-r--r--src/libhomescreen.cpp6
1 files changed, 5 insertions, 1 deletions
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)
{