ecore-evas: safety -> normal null check in _ecore_evas_focus_device_set()
authorMike Blumenkrantz <zmike@osg.samsung.com>
Sat, 10 Jun 2017 00:16:07 +0000 (20:16 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 9 Jun 2017 23:14:58 +0000 (19:14 -0400)
when unsetting focus, if the specified seat doesn't exist then there is no
focus to unset

src/lib/ecore_evas/ecore_evas.c

index 9568459..ccc54b9 100644 (file)
@@ -1987,7 +1987,9 @@ _ecore_evas_focus_device_set(Ecore_Evas *ee, Efl_Input_Device *seat,
 
    if (!seat)
      seat = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
-   EINA_SAFETY_ON_NULL_RETURN(seat);
+   if (on)
+     EINA_SAFETY_ON_NULL_RETURN(seat);
+   else if (!seat) return;
 
    if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT)
      {