summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
Diffstat (limited to 'player')
-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);