From f612de17129054c915c23b18241988a284f0baa5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 8 Jan 2020 03:45:17 +0100 Subject: vo_gpu: fix crash if dither texture fails to allocate Theoretically possible (and quite unlikely due to the small texture size). The code was originally written with the assumption that texture allocations can't fail, and it was never updated out of laziness. Untested. --- video/out/gpu/video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 3ec5cdfcd9..88a8557cc2 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -2764,6 +2764,9 @@ static void pass_dither(struct gl_video *p) debug_check_gl(p, "dither setup"); talloc_free(temp); + + if (!p->dither_texture) + return; } GLSLF("// dithering\n"); -- cgit v1.2.3