[Mesa-dev] [PATCH] vulkan/wsi/x11: don't crash on null wsi x11 connection
Jason Ekstrand
jason at jlekstrand.net
Thu Dec 22 22:10:15 UTC 2016
Pushed with my R-B
On Thu, Dec 22, 2016 at 2:03 PM, Arda Coskunses <acoskunses at gmail.com>
wrote:
> Without this check driver crash when application window
> closed unexpectedly.
> Acked-by: Edward O'Callaghan <funfunctor at folklore194.net>
> ---
> src/vulkan/wsi/wsi_common_x11.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_
> x11.c
> index 037aa50..345740e 100644
> --- a/src/vulkan/wsi/wsi_common_x11.c
> +++ b/src/vulkan/wsi/wsi_common_x11.c
> @@ -261,6 +261,10 @@ 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) {
> + return false;
> + }
> +
> if (!wsi_conn->has_dri3) {
> fprintf(stderr, "vulkan: No DRI3 support\n");
> return false;
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161222/c0462366/attachment.html>
More information about the mesa-dev
mailing list