diff options
author | Dave Airlie <airlied@gmail.com> | 2013-09-10 14:46:23 +1000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2013-09-27 15:30:03 -0700 |
commit | 3801e9a87ed350e9891771967295048e3eab209e (patch) | |
tree | c4dd93b428f8df984b844d6ff9788277a023c704 | |
parent | faec15dc7a5dfed7ffd3399331a3ce601f73cdc0 (diff) | |
download | mesa-3801e9a87ed350e9891771967295048e3eab209e.tar.gz mesa-3801e9a87ed350e9891771967295048e3eab209e.tar.bz2 mesa-3801e9a87ed350e9891771967295048e3eab209e.zip |
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 2f508f244e8e4cb4bb2b9f813548fbf0c89b77c1)
-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; |