[Mesa-dev] [PATCH] vulkan/wsi/x11: don't crash on null wsi x11 connection

Edward O'Callaghan funfunctor at folklore1984.net
Tue Dec 20 05:34:10 UTC 2016


Acked-by: Edward O'Callaghan <funfunctor at folklore194.net>

On 12/20/2016 02:59 PM, Arda Coskunses wrote:
> Without this check driver crash when application window
> closed unexpectedly.
> ---
>  src/vulkan/wsi/wsi_common_x11.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
> index 25ba0c1..afb7809 100644
> --- a/src/vulkan/wsi/wsi_common_x11.c
> +++ b/src/vulkan/wsi/wsi_common_x11.c
> @@ -261,6 +261,11 @@ VkBool32 wsi_get_physical_device_xcb_presentation_support(
>     struct wsi_x11_connection *wsi_conn =
>        wsi_x11_get_connection(wsi_device, alloc, connection);
>  
> +   if (!wsi_conn) {
> +      fprintf(stderr, "vulkan: wsi connection lost\n");
> +      return false;
> +   }
> +
>     if (!wsi_conn->has_dri3) {
>        fprintf(stderr, "vulkan: No DRI3 support\n");
>        return false;
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161220/daec8287/attachment.sig>


More information about the mesa-dev mailing list