<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 22, 2016 at 1:55 PM, Arda Coskunses <span dir="ltr"><<a href="mailto:acoskunses@gmail.com" target="_blank">acoskunses@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">When application window closed unexpectedly due to<br>
lost window visualtypes getting invlaid parameters<br>
which is causing a crash. Necessary check is added<br>
to prevent the crash.<br>
---<br>
 src/vulkan/wsi/wsi_common_x11.<wbr>c | 3 +++<br>
 1 file changed, 3 insertions(+)<br>
<br>
diff --git a/src/vulkan/wsi/wsi_common_<wbr>x11.c b/src/vulkan/wsi/wsi_common_<wbr>x11.c<br>
</span>index afb7809..08b0479 100644<br>
<span class="">--- a/src/vulkan/wsi/wsi_common_<wbr>x11.c<br>
+++ b/src/vulkan/wsi/wsi_common_<wbr>x11.c<br>
@@ -354,6 +354,9 @@ x11_surface_get_capabilities(<wbr>VkIcdSurfaceBase *icd_surface,<br>
    xcb_visualtype_t *visual =<br>
       get_visualtype_for_window(<wbr>conn, window, &visual_depth);<br>
<br>
+   if (!visual)<br>
</span>+      return VK_ERROR_SURFACE_LOST_KHR;<br>
<div class="HOEnZb"><div class="h5">+<br>
    geom = xcb_get_geometry_reply(conn, geom_cookie, &err);<br>
    if (geom) {<br>
       VkExtent2D extent = { geom->width, geom->height };<br>
--<br>
2.7.4<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>