0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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.
This commit is contained in:
wm4 2016-03-23 14:49:39 +01:00
parent a07832313d
commit c7f802ee45

View File

@ -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)