diff options
-rw-r--r-- | video/out/vo_opengl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 306e893f3b..64d537bd5f 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -365,8 +365,10 @@ static void uninit(struct vo *vo) gl_video_uninit(p->renderer); gl_hwdec_uninit(p->hwdec); - hwdec_devices_set_loader(vo->hwdec_devs, NULL, NULL); - hwdec_devices_destroy(vo->hwdec_devs); + if (vo->hwdec_devs) { + hwdec_devices_set_loader(vo->hwdec_devs, NULL, NULL); + hwdec_devices_destroy(vo->hwdec_devs); + } mpgl_uninit(p->glctx); } |