diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c index 79d301763..2d1ec5d85 100644 --- a/hw/xfree86/common/xf86RandR.c +++ b/hw/xfree86/common/xf86RandR.c @@ -74,7 +74,7 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations) *rotations = RR_Rotate_0; - for (mode = scrp->modes; ; mode = mode->next) + for (mode = scrp->modes; mode != NULL ; mode = mode->next) { int refresh = xf86RandRModeRefresh (mode);