aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2015-12-05 23:53:41 +0100
committerGravatar wm4 <wm4@nowhere>2015-12-05 23:53:41 +0100
commit63204eda5debc43851fedcaec8450284349d6995 (patch)
treeba008102a6b41d16c50b0e258942200d9915acc8 /video
parent791228f2ab504eb5a40c3cf03508136f3404e4d8 (diff)
vo_opengl_cb: avoid NULL pointer deref in corner cases
Found by Coverity.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_opengl_cb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/vo_opengl_cb.c b/video/out/vo_opengl_cb.c
index 37708c0532..2a8dfe2974 100644
--- a/video/out/vo_opengl_cb.c
+++ b/video/out/vo_opengl_cb.c
@@ -269,7 +269,8 @@ int mpv_opengl_cb_draw(mpv_opengl_cb_context *ctx, int fbo, int vp_w, int vp_h)
struct vo_priv *opts = ctx->new_opts ? ctx->new_opts : p;
if (opts) {
gl_video_set_options(ctx->renderer, opts->renderer_opts);
- gl_video_configure_queue(ctx->renderer, vo);
+ if (vo)
+ gl_video_configure_queue(ctx->renderer, vo);
ctx->gl->debug_context = opts->use_gl_debug;
gl_video_set_debug(ctx->renderer, opts->use_gl_debug);
}