On 09/14/2013 09:37 AM, Brian Paul wrote:
On 09/13/2013 08:15 PM, Dave Airlie wrote:
It seems a user app can get us into this state, I trigger the fail
running fbo-maxsize inside virgl, it fails to create the backing
storage for the texture object, but then segfaults here when it
should fail the completeness test.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
  src/mesa/state_tracker/st_cb_fbo.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/mesa/state_tracker/st_cb_fbo.c
b/src/mesa/state_tracker/st_cb_fbo.c
index 77aaccd..09daded 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -505,6 +505,9 @@ st_validate_attachment(struct gl_context *ctx,
     if (!stObj)
        return GL_FALSE;

+   if (!stObj->pt)
+      return GL_FALSE;
+
     format = stObj->pt->format;
     texFormat = att->Renderbuffer->TexImage->TexFormat;



You could otherwise fold that into the previous check:

if (!stObj || !stObj->pt)
    return;


but either way is OK.

Reviewed-by: Brian Paul <bri...@vmware.com>

Oh, and tag/cc for the 9.2 branch?

-Brian


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to