enlightenment crashing if accel filter is missing, applying NULL check 48/131948/1
authorBhavi Dhingra <b.dhingra@samsung.com>
Wed, 31 May 2017 09:37:28 +0000 (15:07 +0530)
committerBhavi Dhingra <b.dhingra@samsung.com>
Wed, 31 May 2017 09:37:28 +0000 (15:07 +0530)
Change-Id: I028c2304e18fb7160a48b2edeeab204a1b89a624
Signed-off-by: Bhavi Dhingra <b.dhingra@samsung.com>
src/evdev.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 37823b4..ababc5b
@@ -381,7 +381,12 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
                /* Apply pointer acceleration. */
                motion.dx = dx_unaccel;
                motion.dy = dy_unaccel;
-               filter_dispatch(device->pointer.filter, &motion, device, time);
+               if(device->pointer.filter) {
+                       filter_dispatch(device->pointer.filter, &motion, device, time);
+               } else {
+                       log_bug_libinput(libinput,
+                                        "accel filter missing\n");
+               }
 
                if (motion.dx == 0.0 && motion.dy == 0.0 &&
                    dx_unaccel == 0.0 && dy_unaccel == 0.0) {