compositor-drm: Prevent a crash in the pixman renderer

When pixman is used and no connector could be found (or any other
error), drm_backend_create() tried to destroy a gbm_device that would
only be created in init_egl(), resulting in a segfault.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Emmanuel Gil Peyrot 2016-05-02 22:40:13 +01:00 committed by Pekka Paalanen
parent a62138bf90
commit b8347e3a45
1 changed files with 2 additions and 1 deletions

View File

@ -3191,7 +3191,8 @@ err_drm_source:
err_udev_input:
udev_input_destroy(&b->input);
err_sprite:
gbm_device_destroy(b->gbm);
if (b->gbm)
gbm_device_destroy(b->gbm);
destroy_sprites(b);
err_udev_dev:
udev_device_unref(drm_device);