1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-30 19:22:11 +00:00

vo_gpu_next: fix crash on uninit after startup failure

This commit is contained in:
rcombs 2022-10-14 08:33:47 -05:00 committed by Niklas Haas
parent 59fc8eecbc
commit dfb5b0c55f

View File

@ -1352,7 +1352,7 @@ static void uninit(struct vo *vo)
pthread_mutex_destroy(&p->dr_lock); pthread_mutex_destroy(&p->dr_lock);
char *cache_file = get_cache_file(p); char *cache_file = get_cache_file(p);
if (cache_file) { if (cache_file && p->rr) {
FILE *cache = fopen(cache_file, "wb"); FILE *cache = fopen(cache_file, "wb");
if (cache) { if (cache) {
size_t size = pl_renderer_save(p->rr, NULL); size_t size = pl_renderer_save(p->rr, NULL);