<div dir="ltr">Sorry for the repeat, I was adding the Intel devs to the CC list since it's related to swr<br><div class="gmail_extra"><br>-Chuck<div class="gmail_quote"><br>On Wed, Feb 21, 2018 at 9:26 AM, Chuck Atkins <span dir="ltr"><<a href="mailto:chuck.atkins@kitware.com" target="_blank">chuck.atkins@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This fixes a segfault exposed by a29d63ecf7 which occurs when swr is<br>
used on an unsupported architecture.<br>
<br>
Signed-off-by: Chuck Atkins <<a href="mailto:chuck.atkins@kitware.com">chuck.atkins@kitware.com</a>><br>
Cc: <a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.<wbr>org</a><br>
Cc: George Kyriazis <<a href="mailto:george.kyriazis@intel.com">george.kyriazis@intel.com</a>><br>
Cc: Bruce Cherniak <<a href="mailto:bruce.cherniak@intel.com">bruce.cherniak@intel.com</a>><br>
---<br>
src/gallium/state_trackers/<wbr>glx/xlib/xm_api.c | 11 +++++++----<br>
1 file changed, 7 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/gallium/state_trackers/<wbr>glx/xlib/xm_api.c b/src/gallium/state_trackers/<wbr>glx/xlib/xm_api.c<br>
index 934c0aba11..3aec57e85d 100644<br>
--- a/src/gallium/state_trackers/<wbr>glx/xlib/xm_api.c<br>
+++ b/src/gallium/state_trackers/<wbr>glx/xlib/xm_api.c<br>
@@ -182,9 +182,12 @@ xmesa_close_display(Display *display)<br>
* }<br>
*/<br>
<br>
- if (xmdpy->smapi->destroy)<br>
- xmdpy->smapi->destroy(xmdpy-><wbr>smapi);<br>
- free(xmdpy->smapi);<br>
+ if (xmdpy->smapi)<br>
+ {<br>
+ if (xmdpy->smapi->destroy)<br>
+ xmdpy->smapi->destroy(xmdpy-><wbr>smapi);<br>
+ free(xmdpy->smapi);<br>
+ }<br>
<br>
XFree((char *) info);<br>
}<br>
@@ -767,7 +770,7 @@ XMesaVisual XMesaCreateVisual( Display *display,<br>
XMesaVisual v;<br>
GLint red_bits, green_bits, blue_bits, alpha_bits;<br>
<br>
- if (!xmdpy)<br>
+ if (!xmdpy || !xmdpy->screen)<br>
return NULL;<br>
<br>
/* For debugging only */<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-stable mailing list<br>
<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.<wbr>org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-stable" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-stable</a><br>
</font></span></blockquote></div><br></div></div>