From eb46d46e730650f42333b0dda907d95142ba3286 Mon Sep 17 00:00:00 2001 From: Anton Kindestam Date: Wed, 8 Nov 2017 21:57:16 +0100 Subject: [PATCH] video: fix use of possibly-NULL pointer in drm_egl_init --- video/out/opengl/context_drm_egl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c index 606736d483..3526e2bdf6 100644 --- a/video/out/opengl/context_drm_egl.c +++ b/video/out/opengl/context_drm_egl.c @@ -395,7 +395,8 @@ static bool drm_egl_init(struct ra_ctx *ctx) p->drm_params.fd = p->kms->fd; p->drm_params.crtc_id = p->kms->crtc_id; - p->drm_params.atomic_request = p->kms->atomic_context->request; + if (p->kms->atomic_context) + p->drm_params.atomic_request = p->kms->atomic_context->request; struct ra_gl_ctx_params params = { .swap_buffers = drm_egl_swap_buffers, .native_display_type = "opengl-cb-drm-params",