[PATCH xserver 1/2] present: Make present_restore_screen_pixmap handle screen->root == NULL

Hans de Goede hdegoede at redhat.com
Mon Aug 8 19:33:32 UTC 2016


Hi,

On 03-08-16 03:19, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Easier than dealing with it in all paths that can end up here during
> server shutdown.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Both patches looks good to me and are:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans

> ---
>  present/present.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/present/present.c b/present/present.c
> index 5fde846..8d37395 100644
> --- a/present/present.c
> +++ b/present/present.c
> @@ -439,7 +439,7 @@ present_restore_screen_pixmap(ScreenPtr screen)
>       * Only do this the first time for a particular unflip operation, or
>       * we'll probably scribble over other windows
>       */
> -    if (screen->GetWindowPixmap(screen->root) == flip_pixmap)
> +    if (screen->root && screen->GetWindowPixmap(screen->root) == flip_pixmap)
>          present_copy_region(&screen_pixmap->drawable, flip_pixmap, NULL, 0, 0);
>
>      /* Switch back to using the screen pixmap now to avoid
> @@ -447,7 +447,8 @@ present_restore_screen_pixmap(ScreenPtr screen)
>       */
>      if (flip_window)
>          present_set_tree_pixmap(flip_window, flip_pixmap, screen_pixmap);
> -    present_set_tree_pixmap(screen->root, NULL, screen_pixmap);
> +    if (screen->root)
> +        present_set_tree_pixmap(screen->root, NULL, screen_pixmap);
>  }
>
>  static void
>


More information about the xorg-devel mailing list