diff options
-rw-r--r-- | player/screenshot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player/screenshot.c b/player/screenshot.c index 02cbb4a500..33b972bb25 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -287,9 +287,10 @@ static char *gen_fname(screenshot_ctx *ctx, const char *file_ext) void *t = fname; dir = mp_get_user_path(t, ctx->mpctx->global, dir); fname = mp_path_join(NULL, dir, fname); - talloc_free(t); mp_mkdirp(dir); + + talloc_free(t); } if (!mp_path_exists(fname)) |