[cogl] kms: Avoid using struct member before it is set
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] kms: Avoid using struct member before it is set
- Date: Wed, 30 Nov 2011 15:38:31 +0000 (UTC)
commit 7f2a8963517cec7c4e9f24f5c7f770198f221a07
Author: Rob Bradford <rob linux intel com>
Date: Wed Nov 30 15:33:33 2011 +0000
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>
cogl/winsys/cogl-winsys-kms.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-kms.c b/cogl/winsys/cogl-winsys-kms.c
index f0ef592..cad666d 100644
--- a/cogl/winsys/cogl-winsys-kms.c
+++ b/cogl/winsys/cogl-winsys-kms.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]