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 before trying to
use 'sd'.

Fixes Coverity CID1399425

@fix

Depends on D8348

Reviewers: raster, cedric, zmike, bu5hm4n, stefan_schmidt

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8349
This commit is contained in:
Christopher Michael 2019-03-15 08:58:04 -04:00
parent 94405eca3b
commit eeb6d626ea
1 changed files with 1 additions and 0 deletions

View File

@ -9236,6 +9236,7 @@ EAPI void
elm_win_noblank_set(Evas_Object *obj, Eina_Bool noblank)
{
Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
EINA_SAFETY_ON_NULL_RETURN(sd);
noblank = !!noblank;
if (sd->noblank == noblank) return;
sd->noblank = noblank;