diff options
-rw-r--r-- | player/scripting.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/player/scripting.c b/player/scripting.c index c42706a0b9..81623cb518 100644 --- a/player/scripting.c +++ b/player/scripting.c @@ -328,6 +328,9 @@ const struct mp_scripting mp_scripting_cplugin = { static int load_run(struct mp_script_args *args) { + // The arg->client object might die and with it args->log, so duplicate it. + args->log = mp_log_new(args, args->log, NULL); + int fds[2]; if (!mp_ipc_start_anon_client(args->mpctx->ipc_ctx, args->client, fds)) return -1; |