From b422393bbcc063e7f2cde614ce36b770b15e8273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 1 May 2024 03:14:45 +0200 Subject: [PATCH] x11/window: Add type-check guard to meta_window_x11_get_group() Since this is still public API we want to ensure that we don't cast it directly without having checked its type Part-of: --- src/x11/window-x11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 536ccf447..b87c5072a 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -4536,6 +4536,8 @@ meta_window_x11_get_group (MetaWindow *window) MetaWindowX11 *window_x11; MetaWindowX11Private *priv; + g_return_val_if_fail (META_IS_WINDOW_X11 (window), NULL); + if (window->unmanaging) return NULL;