diff options
author | Fabian Bieler <[email protected]> | 2011-04-05 07:51:01 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-04-05 07:51:01 -0600 |
commit | c7339d42c603048c0f89276da6576647c4421ba0 (patch) | |
tree | 53741adf9761b7c186eba2061cfa040ff7a19b2b /src/mesa/main | |
parent | db0f9e701d59dcfcd3b50f4d245897692f27fec9 (diff) |
mesa: Guard against null pointer deref in fbo validation
This matches the behaviour below when numSamples is compared.
At least with the gallium state tracker this can actually occur if st_render_texture fails.
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/fbobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index f0065ad06a9..eb1fef51427 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -746,7 +746,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, continue; } - if (numSamples < 0) { + if (att->Renderbuffer && numSamples < 0) { /* first buffer */ numSamples = att->Renderbuffer->NumSamples; } |