From 03859a581c1f671fe90e90bca102ddd1c8025da6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 18 Jan 2014 17:59:34 +0100 Subject: player: prevent null pointer deref on uninit after -V Caused by the OSD changes. Fixes #490. --- player/command.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'player') diff --git a/player/command.c b/player/command.c index bb0e9789cf..681c48c9ab 100644 --- a/player/command.c +++ b/player/command.c @@ -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); -- cgit v1.2.3