aboutsummaryrefslogtreecommitdiff
path: root/render/gles2/texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/gles2/texture.c')
-rw-r--r--render/gles2/texture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index 4f884d73..6cfd103d 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -25,7 +25,8 @@ bool wlr_texture_is_gles2(struct wlr_texture *wlr_texture) {
struct wlr_gles2_texture *gles2_get_texture(
struct wlr_texture *wlr_texture) {
assert(wlr_texture_is_gles2(wlr_texture));
- return (struct wlr_gles2_texture *)wlr_texture;
+ struct wlr_gles2_texture *texture = wl_container_of(wlr_texture, texture, wlr_texture);
+ return texture;
}
static bool gles2_texture_update_from_buffer(struct wlr_texture *wlr_texture,