video: fix use of possibly-NULL pointer in drm_egl_init

This commit is contained in:
Anton Kindestam 2017-11-08 21:57:16 +01:00 committed by Jan Ekström
parent 5129d777a6
commit eb46d46e73
1 changed files with 2 additions and 1 deletions

View File

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