From 10c7ab2dec0098a2c868af403d3351bf4da80a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 12 Jul 2022 17:09:01 +0200 Subject: [PATCH] cursor-renderer/native: Fix type in unset_crtc_cursor_renderer_privates Since the commit below, meta_crtc_kms_get_cursor_renderer_private has returned a CrtcCursorData pointer, but this code was still treating it as a MetaDrmBuffer pointer. Fixes: fea8ebcca9e1 ("cursor-renderer/native: Store struct in CRTC private") Part-of: --- src/backends/native/meta-cursor-renderer-native.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c index 96c54baf0..7da9b2c5a 100644 --- a/src/backends/native/meta-cursor-renderer-native.c +++ b/src/backends/native/meta-cursor-renderer-native.c @@ -1104,11 +1104,11 @@ unset_crtc_cursor_renderer_privates (MetaGpu *gpu, for (l = meta_gpu_get_crtcs (gpu); l; l = l->next) { MetaCrtcKms *crtc_kms = META_CRTC_KMS (l->data); - MetaDrmBuffer *crtc_buffer; + CrtcCursorData *crtc_cursor_data; - crtc_buffer = meta_crtc_kms_get_cursor_renderer_private (crtc_kms); - if (buffer == crtc_buffer) - meta_crtc_kms_set_cursor_renderer_private (crtc_kms, NULL, NULL); + crtc_cursor_data = meta_crtc_kms_get_cursor_renderer_private (crtc_kms); + if (crtc_cursor_data && buffer == crtc_cursor_data->buffer) + crtc_cursor_data->buffer = NULL; } }