diff --git a/randr/rrmode.c b/randr/rrmode.c index 1117581..302278a 100644 --- a/randr/rrmode.c +++ b/randr/rrmode.c @@ -165,7 +165,10 @@ RRModesForScreen (ScreenPtr pScreen, int *num_ret) int num_screen_modes = 0; screen_modes = xalloc ((num_modes ? num_modes : 1) * sizeof (RRModePtr)); - + + if (!screen_modes) + return NULL; + /* * Add modes from all outputs */