kms: Avoid using struct member before it is set

When saving the CRTC we were trying to use a struct member for the encoder
that wasn't valid at that point in time - instead use the local variable.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Rob Bradford 2011-11-30 15:33:33 +00:00
parent da154b9a3b
commit 7f2a896351

View File

@ -173,7 +173,7 @@ _cogl_winsys_kms_display_setup (CoglDisplay *display, GError **error)
}
kms_display->saved_crtc = drmModeGetCrtc (kms_renderer->fd,
kms_display->encoder->crtc_id);
encoder->crtc_id);
kms_display->connector = connector;
kms_display->encoder = encoder;