diff options
author | Eric Engestrom <[email protected]> | 2018-11-05 09:57:09 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-11-08 16:05:06 +0000 |
commit | 422c905f4b6739e0913fe58fd987826b1fbd119e (patch) | |
tree | 920c86183645a1147ddb66ed788777009494e6d1 /src/vulkan | |
parent | 1348e6e25558743fbbdf4b2130b334fb9a8ff475 (diff) |
wsi/wayland: only finish() a successfully init()ed display
Fixes: 43691024982b3ea734ad0 "vulkan/wsi/wayland: Stop caching Wayland displays"
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
(cherry picked from commit d515ded4d951b830b560c352d64918a89027bee5)
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/wsi/wsi_common_wayland.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 12014b0c143..3d3a60167bf 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -456,7 +456,8 @@ wsi_wl_get_presentation_support(struct wsi_device *wsi_device, struct wsi_wl_display display; VkResult ret = wsi_wl_display_init(wsi, &display, wl_display, false); - wsi_wl_display_finish(&display); + if (ret == VK_SUCCESS) + wsi_wl_display_finish(&display); return ret == VK_SUCCESS; } |