diff options
author | Vinson Lee <[email protected]> | 2010-04-16 00:35:30 -0700 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2010-04-16 00:36:50 -0700 |
commit | 8c456775887e192dd7464b94295f4410045c7c07 (patch) | |
tree | 7b636dedb54440069d38e7ded2c2a3cded7ac955 /src/mesa/drivers/dri/swrast | |
parent | e0543599b583ab93c28fff7c91cfc527051b45b1 (diff) |
drisw: Move pointer dereferences to after NULL checks.
Diffstat (limited to 'src/mesa/drivers/dri/swrast')
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 8b68281fab0..6f54981eba1 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -602,12 +602,14 @@ dri_make_current(__DRIcontext * cPriv, if (cPriv) { struct dri_context *ctx = dri_context(cPriv); - struct dri_drawable *draw = dri_drawable(driDrawPriv); - struct dri_drawable *read = dri_drawable(driReadPriv); + struct dri_drawable *draw; + struct dri_drawable *read; if (!driDrawPriv || !driReadPriv) return GL_FALSE; + draw = dri_drawable(driDrawPriv); + read = dri_drawable(driReadPriv); mesaCtx = &ctx->Base; mesaDraw = &draw->Base; mesaRead = &read->Base; |