aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2016-03-23 14:49:39 +0100
committerGravatar wm4 <wm4@nowhere>2016-03-23 14:49:39 +0100
commitc7f802ee45ad16d74bfae1510d395d3be36d4de2 (patch)
tree5a38c0e3d6f6e7f2327a574084f3b6d3e6330ccf /video/out
parenta07832313d382c2a6fce9477ce1067f125d94a2a (diff)
vo_opengl_cb: fix NULL deref
Broken in commit d6c99c85. vo_opengl_cb.c adds the corner case that p->osd can be NULL. This make opengl-cb always crash.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/opengl/video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index b1c2231bb0..5a92d4286d 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -2450,7 +2450,8 @@ void gl_video_resize(struct gl_video *p, int vp_w, int vp_h,
gl_video_reset_surfaces(p);
- mpgl_osd_resize(p->osd, p->osd_rect, p->image_params.stereo_out);
+ if (p->osd)
+ mpgl_osd_resize(p->osd, p->osd_rect, p->image_params.stereo_out);
}
static bool unmap_image(struct gl_video *p, struct mp_image *mpi)