mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
present: Check for NULL to prevent crash
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275 Signed-off-by: Błażej Szczygieł <spaz16@wp.pl> Tested-by: Aaron Plattner <aplattner@nvidia.com>
This commit is contained in:
committed by
Aaron Plattner
parent
d1f26c3e75
commit
22d5818851
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user