diff options
author | Dave Airlie <[email protected]> | 2013-09-10 14:46:23 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2013-09-16 08:33:02 +1000 |
commit | 2f508f244e8e4cb4bb2b9f813548fbf0c89b77c1 (patch) | |
tree | fdc72dd0c4aaca3057c9137a66edea6d89899faa /src/mesa/state_tracker | |
parent | bbe3d6dc29f218e4d790e5ea359d3c6736e94226 (diff) |
st/mesa: don't dereference stObj->pt if NULL
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.
Cc: "9.2" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 77aaccd0489..20894825f7f 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -502,7 +502,7 @@ st_validate_attachment(struct gl_context *ctx, if (att->Type != GL_TEXTURE) return GL_TRUE; - if (!stObj) + if (!stObj || !stObj->pt) return GL_FALSE; format = stObj->pt->format; |