summaryrefslogtreecommitdiff
path: root/src/lib/elput
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-02-26 00:35:20 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-02-26 00:36:17 +0900
commitdb6e4622af6768a9366ad7fd322cb9215715578b (patch)
treeab78acad68074e013b0cb06f4a5013f909a5095c /src/lib/elput
parentcc1e1a5b5601a40d49f95922deee58a12b230afd (diff)
elput - don't segv on shutdown when libinput dispatch happens to free lib
Diffstat (limited to 'src/lib/elput')
-rw-r--r--src/lib/elput/elput_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index 08f06cbfd8..06da3d0149 100644
--- a/src/lib/elput/elput_input.c
+++ b/src/lib/elput/elput_input.c
@@ -312,7 +312,7 @@ _process_events(Elput_Input *ei)
312{ 312{
313 struct libinput_event *event; 313 struct libinput_event *event;
314 314
315 while ((event = libinput_get_event(ei->lib))) 315 while ((ei->lib) && (event = libinput_get_event(ei->lib)))
316 { 316 {
317 _process_event(event); 317 _process_event(event);
318 libinput_event_destroy(event); 318 libinput_event_destroy(event);
@@ -326,7 +326,7 @@ _cb_input_dispatch(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
326 326
327 ei = data; 327 ei = data;
328 328
329 if (libinput_dispatch(ei->lib) != 0) 329 if ((ei->lib) && (libinput_dispatch(ei->lib) != 0))
330 WRN("libinput failed to dispatch events"); 330 WRN("libinput failed to dispatch events");
331 331
332 _process_events(ei); 332 _process_events(ei);