From c1282d4d43be8fb8bbc8529b22804d288d59038a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sun, 17 Mar 2024 12:52:38 +0100 Subject: player/main: move terminal_uninit to the end It is strange to do terminal_uninit() and still use terminal after. Even tho it has no side-effects. --- player/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'player') diff --git a/player/main.c b/player/main.c index 0458831f7c..09cce990bb 100644 --- a/player/main.c +++ b/player/main.c @@ -184,16 +184,17 @@ void mp_destroy(struct MPContext *mpctx) cocoa_set_input_context(NULL); #endif - if (cas_terminal_owner(mpctx, mpctx)) { - terminal_uninit(); - cas_terminal_owner(mpctx, NULL); - } - mp_input_uninit(mpctx->input); uninit_libav(mpctx->global); mp_msg_uninit(mpctx->global); + + if (cas_terminal_owner(mpctx, mpctx)) { + terminal_uninit(); + cas_terminal_owner(mpctx, NULL); + } + assert(!mpctx->num_abort_list); talloc_free(mpctx->abort_list); mp_mutex_destroy(&mpctx->abort_lock); -- cgit v1.2.3