player: prevent null pointer deref on uninit after -V

Caused by the OSD changes. Fixes #490.
This commit is contained in:
wm4 2014-01-18 17:59:34 +01:00
parent 8cbed35403
commit 03859a581c
1 changed files with 2 additions and 0 deletions

View File

@ -2448,6 +2448,8 @@ static void overlay_remove(struct MPContext *mpctx, int id)
static void overlay_uninit(struct MPContext *mpctx)
{
if (!mpctx->osd)
return;
for (int id = 0; id < OVERLAY_MAX_ID; id++)
overlay_remove(mpctx, id);
osd_set_external2(mpctx->osd, NULL);