mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
mesa/main: Move NULL pointer check.
In blit_framebuffer we're already doing a NULL
pointer check for readFb and drawFb so it makes
sense to do it before we actually use the pointers.
CID: 1412569
Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
(cherry picked from commit b3b6121115)
[Andres Gomez: resolve trivial conflicts]
Signed-off-by: Andres Gomez <agomez@igalia.com>
This commit is contained in:
parent
1d4d3f88c6
commit
e9f0179221
1 changed files with 6 additions and 6 deletions
|
|
@ -191,12 +191,6 @@ _mesa_blit_framebuffer(struct gl_context *ctx,
|
|||
|
||||
FLUSH_VERTICES(ctx, 0);
|
||||
|
||||
/* Update completeness status of readFb and drawFb. */
|
||||
_mesa_update_framebuffer(ctx, readFb, drawFb);
|
||||
|
||||
/* Make sure drawFb has an initialized bounding box. */
|
||||
_mesa_update_draw_buffer_bounds(ctx, drawFb);
|
||||
|
||||
if (!readFb || !drawFb) {
|
||||
/* This will normally never happen but someday we may want to
|
||||
* support MakeCurrent() with no drawables.
|
||||
|
|
@ -204,6 +198,12 @@ _mesa_blit_framebuffer(struct gl_context *ctx,
|
|||
return;
|
||||
}
|
||||
|
||||
/* Update completeness status of readFb and drawFb. */
|
||||
_mesa_update_framebuffer(ctx, readFb, drawFb);
|
||||
|
||||
/* Make sure drawFb has an initialized bounding box. */
|
||||
_mesa_update_draw_buffer_bounds(ctx, drawFb);
|
||||
|
||||
/* check for complete framebuffers */
|
||||
if (drawFb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT ||
|
||||
readFb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue