From 9c7679240ad90367693a462e288308b3fdc08f26 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 30 Mar 2008 19:05:07 -0700 Subject: [PATCH] [randr] don't try to compute crtc transform when no mode is set. Dereferencing the NULL mode pointer would cause a crash. As these transform matrices won't be used while the CRTC is disabled, just leave their values alone. --- randr/rrcrtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index c237f03e61..c43163706d 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -233,7 +233,7 @@ RRCrtcNotify (RRCrtcPtr crtc, RRTransformCopy (&crtc->client_current_transform, transform); RRCrtcChanged (crtc, TRUE); } - if (crtc->changed) + if (crtc->changed && mode) { RRTransformCompute (x, y, mode->mode.width, mode->mode.height,