drisw: Move pointer dereferences to after NULL checks.

This commit is contained in:
Vinson Lee 2010-04-16 00:35:30 -07:00
parent e0543599b5
commit 8c45677588

View file

@ -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;