efl_ui_focus_manager: logical_end could be called before root_set

which would lead to a NULL deref

CID 1374435
This commit is contained in:
Marcel Hollerbach 2017-05-20 20:51:30 +02:00
parent 43cb924faa
commit f424af2578
1 changed files with 3 additions and 0 deletions

View File

@ -1436,6 +1436,9 @@ EOLIAN static Efl_Ui_Focus_Object*
_efl_ui_focus_manager_logical_end(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd)
{
Node *child = pd->root;
EINA_SAFETY_ON_NULL_RETURN_VAL(child, NULL);
//we need to return the most lower right element
while(T(child).children)