mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 08:10:03 +01: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>
(cherry picked from commit 22d5818851)
This commit is contained in:
parent
97c5b77774
commit
d2ce97bd02
1 changed files with 6 additions and 0 deletions
|
|
@ -168,6 +168,9 @@ present_scmd_get_crtc(present_screen_priv_ptr screen_priv, WindowPtr window)
|
||||||
if (!screen_priv->info)
|
if (!screen_priv->info)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (!screen_priv->info->get_crtc)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return (*screen_priv->info->get_crtc)(window);
|
return (*screen_priv->info->get_crtc)(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -206,6 +209,9 @@ present_flush(WindowPtr window)
|
||||||
if (!screen_priv->info)
|
if (!screen_priv->info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!screen_priv->info->flush)
|
||||||
|
return;
|
||||||
|
|
||||||
(*screen_priv->info->flush) (window);
|
(*screen_priv->info->flush) (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue