diff options
author | Olivier Guiter <olivier.guiter@linux.intel.com> | 2014-06-30 16:32:36 +0200 |
---|---|---|
committer | Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com> | 2014-06-30 19:55:40 -0300 |
commit | 86aa034379113b92cb8cdbc7904c42ea87466c6f (patch) | |
tree | df092262f291cb1786d50872c1d664466316cd1f /src/lib | |
parent | e5e6d8f1f2824a469a9c0b88a322108218861fc9 (diff) | |
download | efl-86aa034379113b92cb8cdbc7904c42ea87466c6f.tar.gz |
core_fb: Fix crash on tablet with removable kbd
On tablet with removable keyboard (e.g.: T100), as the FB support
in ecore is very limited, the lib crashes when you remove the kbd.
This patch disabled gracefully a "not anymore present" keyboard...
Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ecore_fb/ecore_fb_li.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ecore_fb/ecore_fb_li.c b/src/lib/ecore_fb/ecore_fb_li.c index f332959966..838576278a 100644 --- a/src/lib/ecore_fb/ecore_fb_li.c +++ b/src/lib/ecore_fb/ecore_fb_li.c @@ -406,6 +406,10 @@ _ecore_fb_li_device_fd_callback(void *data, Ecore_Fd_Handler *fdh EINA_UNUSED) dev = (Ecore_Fb_Input_Device*)data; /* read up to 64 events at once */ len = read(dev->fd, &ev, sizeof(ev)); + if (len < 0) { + dev->listen = EINA_FALSE; + return EINA_FALSE; + } for(i = 0; i < (int)(len / sizeof(ev[0])); i++) { switch(ev[i].type) |