diff options
author | wm4 <wm4@nowhere> | 2014-01-18 17:59:34 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-18 17:59:34 +0100 |
commit | 03859a581c1f671fe90e90bca102ddd1c8025da6 (patch) | |
tree | e83f9941fadf7111333b8f8d05d22d4e3e61e7cd /player | |
parent | 8cbed35403b9905c83c429367aea77a992c90e1e (diff) | |
download | mpv-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')
-rw-r--r-- | player/command.c | 2 |
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); |