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>
This commit is contained in:
parent
d3a7e9a7b5
commit
a07fd4ee66
@ -152,12 +152,15 @@ static GQuark quark_dma_buf_surface_feedback;
|
|||||||
static gboolean
|
static gboolean
|
||||||
should_send_modifiers (MetaBackend *backend)
|
should_send_modifiers (MetaBackend *backend)
|
||||||
{
|
{
|
||||||
MetaRenderer *renderer = meta_backend_get_renderer (backend);
|
MetaRendererNative *renderer_native;
|
||||||
MetaRendererNative *renderer_native = META_RENDERER_NATIVE (renderer);
|
|
||||||
MetaGpuKms *gpu_kms;
|
MetaGpuKms *gpu_kms;
|
||||||
MetaKmsDevice *kms_device;
|
MetaKmsDevice *kms_device;
|
||||||
MetaKmsDeviceFlag flags;
|
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);
|
gpu_kms = meta_renderer_native_get_primary_gpu (renderer_native);
|
||||||
kms_device = meta_gpu_kms_get_kms_device (gpu_kms);
|
kms_device = meta_gpu_kms_get_kms_device (gpu_kms);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user