diff --git a/src/driver-hidpp10.c b/src/driver-hidpp10.c index 9690b0d2..d7bc2420 100644 --- a/src/driver-hidpp10.c +++ b/src/driver-hidpp10.c @@ -573,7 +573,8 @@ hidpp10drv_commit(struct ratbag_device *device) return rc; p.enabled = profile->is_enabled; - strncpy_safe((char*)p.name, profile->name, 24); + if (profile->name != NULL) + strncpy_safe((char*)p.name, profile->name, 24); ratbag_profile_for_each_resolution(profile, resolution) { p.dpi_modes[resolution->index].xres = resolution->dpi_x;