From 2b92ab6dd627e683e89f5beead7debd712b647b3 Mon Sep 17 00:00:00 2001 From: bentiss Date: Wed, 24 May 2017 10:52:56 +0200 Subject: [PATCH] hidpp20drv: fix segfault with G502 (#163) When using the G502 without RGB LEDs, the feature 8070 is not here. And this segfaults :) Signed-off-by: Benjamin Tissoires --- src/driver-hidpp20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index 27da53ac..d0d2f25f 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -253,7 +253,7 @@ hidpp20drv_read_led(struct ratbag_led *led) struct hidpp20_color_led_zone_info *led_info; struct hidpp20_led *h_led; - if (!(drv_data->capabilities & HIDPP_CAP_ONBOARD_PROFILES_8100)) + if (!(drv_data->capabilities & HIDPP_CAP_COLOR_LED_EFFECTS_8070)) return; led_info = &drv_data->led_infos[led->index];