mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
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" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 2f508f244e)
This commit is contained in:
parent
faec15dc7a
commit
3801e9a87e
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue