egl/platform/drm: Don't take display ownership until gbm is initialized
authorAdam Jackson <ajax@redhat.com>
Wed, 3 May 2017 15:03:34 +0000 (11:03 -0400)
committerAdam Jackson <ajax@redhat.com>
Thu, 4 May 2017 16:52:18 +0000 (12:52 -0400)
commitf258815c7d4187fd83f6944943e78206a6cdc4cb
tree0971761dbe60dae0c1263cac7a2e369d23c5830a
parentddb99127a6f6c6d0284f3395e0b06aed575f0ecd
egl/platform/drm: Don't take display ownership until gbm is initialized

If the gbm_create_device() call here actually did fail, any subsequent
eglTerminate on the display would segfault.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
src/egl/drivers/dri2/platform_drm.c