<div dir="ltr">CCing: Jason Ekstrand and Topi Pohjolainen.</div><div class="gmail_extra"><br><div class="gmail_quote">2018-04-09 13:36 GMT+02:00 <span dir="ltr"><<a href="mailto:azzaronea@gmail.com" target="_blank">azzaronea@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Andrea Azzarone <<a href="mailto:azzaronea@gmail.com">azzaronea@gmail.com</a>><br>
<br>
Since make_surface() can fail we need to check the result before dereferencing it.<br>
---<br>
src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 3 +++<br>
1 file changed, 3 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
index 23cb40f322..82baf7c356 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
@@ -714,6 +714,9 @@ miptree_create(struct brw_context *brw,<br>
ISL_SURF_USAGE_DEPTH_BIT | ISL_SURF_USAGE_TEXTURE_BIT,<br>
BO_ALLOC_BUSY, 0, NULL);<br>
<br>
+ if (!mt)<br>
+ return NULL;<br>
+<br>
if (needs_separate_stencil(brw, mt, format) &&<br>
!make_separate_stencil_<wbr>surface(brw, mt)) {<br>
intel_miptree_release(&mt);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.17.0<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Andrea Azzarone<div><a href="http://launchpad.net/~andyrock" target="_blank">http://launchpad.net/~andyrock</a></div><div><a href="http://wiki.ubuntu.com/Andrea" target="_blank">http://wiki.ubuntu.com/Andrea</a>Azzarone</div></div>
</div>