[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.
This commit is contained in:
Keith Packard 2008-03-30 19:05:07 -07:00
parent 315b6d0a42
commit 9c7679240a

View File

@ -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,