From e09679c7cf454740d9c517bf16625fcdc7466c4b Mon Sep 17 00:00:00 2001 From: Bernd Busse Date: Tue, 22 Jun 2021 21:57:53 +0200 Subject: [PATCH] backend: glx: Fix texture access in max-brightness calculation Correctly unpack the inner `gl_texture` from the backend image. related: 2a60836a9bc30d92b4adb46d5f48684a5d2f1ecb --- src/backend/gl/gl_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/gl/gl_common.c b/src/backend/gl/gl_common.c index ba94c989..7f619f13 100644 --- a/src/backend/gl/gl_common.c +++ b/src/backend/gl/gl_common.c @@ -273,7 +273,7 @@ _gl_average_texture_color(backend_t *base, GLuint source_texture, GLuint destina */ static GLuint gl_average_texture_color(backend_t *base, struct backend_image *img) { auto gd = (struct gl_data *)base; - auto inner = (struct gl_texture *)img; + auto inner = (struct gl_texture *)img->inner; // Prepare textures which will be used for destination and source of rendering // during downscaling.