[mutter] wayland/dma-buf: Only try to query KMS device on native backend
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/dma-buf: Only try to query KMS device on native backend
- Date: Thu, 4 Aug 2022 15:09:32 +0000 (UTC)
commit a07fd4ee6628956c86d4bb50d52254997b4b528b
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Aug 4 08:09:23 2022 +0200
wayland/dma-buf: Only try to query KMS device on native backend
This fixes a crash when using the nested backend and DMA buf Wayland
clients.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2553>
src/wayland/meta-wayland-dma-buf.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c
index 67ebbec84e..289e255524 100644
--- a/src/wayland/meta-wayland-dma-buf.c
+++ b/src/wayland/meta-wayland-dma-buf.c
@@ -152,12 +152,15 @@ static GQuark quark_dma_buf_surface_feedback;
static gboolean
should_send_modifiers (MetaBackend *backend)
{
- MetaRenderer *renderer = meta_backend_get_renderer (backend);
- MetaRendererNative *renderer_native = META_RENDERER_NATIVE (renderer);
+ MetaRendererNative *renderer_native;
MetaGpuKms *gpu_kms;
MetaKmsDevice *kms_device;
MetaKmsDeviceFlag flags;
+ if (!META_IS_BACKEND_NATIVE (backend))
+ return FALSE;
+
+ renderer_native = META_RENDERER_NATIVE (meta_backend_get_renderer (backend));
gpu_kms = meta_renderer_native_get_primary_gpu (renderer_native);
kms_device = meta_gpu_kms_get_kms_device (gpu_kms);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]