diff options
author | Christopher Michael <cp.michael@samsung.com> | 2019-03-15 08:57:34 -0400 |
---|---|---|
committer | Christopher Michael <cp.michael@samsung.com> | 2019-03-15 08:57:34 -0400 |
commit | 384d960852b9e2b6fbf90d448c70757dd1b644cf (patch) | |
tree | 620c2dfb80d1f3d04dc674053390380f2ba463e5 | |
parent | 1688b5d5116f2d422b21c4f540008b2c21bb4d42 (diff) | |
download | efl-384d960852b9e2b6fbf90d448c70757dd1b644cf.tar.gz |
efl_ui_win: Fix dereference null return value
Summary:
Coverity reports efl_data_scope_safe_get returns NULL here (checked
273 out of 285 times). Add an EINA_SAFETY check here for a null return.
Fixes Coverity CID1399428
@fix
Depends on D8345
Reviewers: raster, cedric, zmike, bu5hm4n, stefan_schmidt
Reviewed By: cedric
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8346
-rw-r--r-- | src/lib/elementary/efl_ui_win.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index e2ad5bcd21..c468d62d12 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -8845,6 +8845,7 @@ elm_win_keygrab_set(Elm_Win *obj, const char *key, Eina_Bool ret = EINA_FALSE; #ifdef HAVE_ELEMENTARY_X Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE); _internal_elm_win_xwindow_get(sd); if (sd->x.xwin) { |