summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-18 17:59:34 +0100
committerwm4 <wm4@nowhere>2014-01-18 17:59:34 +0100
commit03859a581c1f671fe90e90bca102ddd1c8025da6 (patch)
treee83f9941fadf7111333b8f8d05d22d4e3e61e7cd /player/command.c
parent8cbed35403b9905c83c429367aea77a992c90e1e (diff)
downloadmpv-03859a581c1f671fe90e90bca102ddd1c8025da6.tar.bz2
mpv-03859a581c1f671fe90e90bca102ddd1c8025da6.tar.xz
player: prevent null pointer deref on uninit after -V
Caused by the OSD changes. Fixes #490.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c2
1 files changed, 2 insertions, 0 deletions
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);