xserver: Branch 'server-21.1-branch'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 25 07:52:20 UTC 2022
present/present_scmd.c | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 69774044716039fa70655b3bc6dd6a4ff4535cfd
Author: Błażej Szczygieł <spaz16 at wp.pl>
Date: Thu Jan 13 00:47:27 2022 +0100
present: Check for NULL to prevent crash
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275
Signed-off-by: Błażej Szczygieł <spaz16 at wp.pl>
Tested-by: Aaron Plattner <aplattner at nvidia.com>
(cherry picked from commit 22d5818851967408bb7c903cb345b7ca8766094c)
diff --git a/present/present_scmd.c b/present/present_scmd.c
index da836ea6b..239055bc1 100644
--- a/present/present_scmd.c
+++ b/present/present_scmd.c
@@ -158,6 +158,9 @@ present_scmd_get_crtc(present_screen_priv_ptr screen_priv, WindowPtr window)
if (!screen_priv->info)
return NULL;
+ if (!screen_priv->info->get_crtc)
+ return NULL;
+
return (*screen_priv->info->get_crtc)(window);
}
@@ -196,6 +199,9 @@ present_flush(WindowPtr window)
if (!screen_priv->info)
return;
+ if (!screen_priv->info->flush)
+ return;
+
(*screen_priv->info->flush) (window);
}
More information about the xorg-commit
mailing list