vk: Only finish wayland wsi if we created it
authorKristian Høgsberg Kristensen <krh@owl.jf.intel.com>
Mon, 4 Jan 2016 05:15:29 +0000 (21:15 -0800)
committerKristian Høgsberg Kristensen <krh@owl.jf.intel.com>
Mon, 4 Jan 2016 18:02:50 +0000 (10:02 -0800)
commit75e01c8b2d2c2a40b82fda67113e9a08a426fbeb
tree108402bd4f1e39f0978ea96ae91a33968032ed67
parent05c22f2d74309fec3432523a26e7772e1863af2f
vk: Only finish wayland wsi if we created it

Failure during instance creation will leave instance->wayland_wsi
undefined. When we then try to clean that up we crash. Set
instance->wayland_wsi to NULL on failure and only clean it up if it's
non-NULL.

Fixes part of dEQP-VK.api.object_management.alloc_callback_fail.*
src/vulkan/anv_wsi_wayland.c