diff options
author | Dudemanguy <random342@airmail.cc> | 2024-04-18 14:57:01 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-04-18 14:57:01 -0500 |
commit | e5d683e187d1e67fcfc944769a7c31cfcc2d0491 (patch) | |
tree | ce44be24306ad13fa73677607c8d24de9452a470 /video/out/opengl | |
parent | 4d80e7b72c0a4094f918779359fcce38eb796c40 (diff) | |
download | mpv-master.tar.bz2 mpv-master.tar.xz |
Not all cards support gbm which means the creation of the gbm device
will fail. However during the uninit process, the destruction of the
device was unconditionally done which leads to a segfault. Guard it
instead. Fixes #13929.
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/context_drm_egl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c index ce86570efe..da28093562 100644 --- a/video/out/opengl/context_drm_egl.c +++ b/video/out/opengl/context_drm_egl.c @@ -491,7 +491,8 @@ static void drm_egl_uninit(struct ra_ctx *ctx) if (p->gbm.surface) gbm_surface_destroy(p->gbm.surface); eglTerminate(p->egl.display); - gbm_device_destroy(p->gbm.device); + if (p->gbm.device) + gbm_device_destroy(p->gbm.device); if (p->drm_params.render_fd != -1) close(p->drm_params.render_fd); |