diff --git a/dix/devices.c b/dix/devices.c index 62ff4b04c..f5d295295 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2341,7 +2341,7 @@ RecalculateMasterButtons(DeviceIntPtr slave) maxbuttons = max(maxbuttons, dev->button->numButtons); } - if (master->button->numButtons != maxbuttons) + if (master->button && master->button->numButtons != maxbuttons) { int i; DeviceChangedEvent event;