egl/dri2: only destroy created objects
authorMichael Olbrich <m.olbrich@pengutronix.de>
Tue, 29 Aug 2017 09:51:20 +0000 (11:51 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 30 Aug 2017 13:06:49 +0000 (14:06 +0100)
commit81d5c31631840db704337489cf677cc596da79f5
treeaa4d023cc175b523ad176ac953b92784883517c6
parent13c23b19d0b3b965d666498eb759e63fc4a625d9
egl/dri2: only destroy created objects

dri2_display_destroy may be called by dri2_initialize_wayland_drm() if
initialization fails. In this case, these objects may not be initialized.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/egl_dri2.c