diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index b81c390f1..212352c15 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -55,6 +55,8 @@ RRCrtcCreate (void *devPrivate) { RRCrtcPtr crtc; + if (!RRInit()) + return NULL; crtc = xalloc (sizeof (RRCrtcRec)); if (!crtc) return NULL; diff --git a/randr/rrmode.c b/randr/rrmode.c index 3cd9ef273..a0696e170 100644 --- a/randr/rrmode.c +++ b/randr/rrmode.c @@ -67,6 +67,9 @@ RRModeGet (xRRModeInfo *modeInfo, } } + if (!RRInit ()) + return NULL; + mode = xalloc (sizeof (RRModeRec) + modeInfo->nameLength + 1); if (!mode) return NULL; diff --git a/randr/rroutput.c b/randr/rroutput.c index 8b760ec9a..f38f5826a 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -51,6 +51,8 @@ RROutputCreate (const char *name, { RROutputPtr output; + if (!RRInit()) + return NULL; output = xalloc (sizeof (RROutputRec) + nameLength + 1); if (!output) return NULL;