<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 22, 2016 at 9:30 AM, 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">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></blockquote><div><br></div><div>Yeah... X11 is racy. Anything can happen.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<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>
index afb7809..8afff8b 100644<br>
--- 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>
+ return VK_ERROR_OUT_OF_HOST_MEMORY;<br></blockquote><div><br></div><div>I think VK_ERROR_SURFACE_LOST_KHR would be more appropriate here.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
geom = xcb_get_geometry_reply(conn, geom_cookie, &err);<br>
if (geom) {<br>
VkExtent2D extent = { geom->width, geom->height };<br>
<span class="HOEnZb"><font color="#888888">--<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>
</font></span></blockquote></div><br></div></div>