diff options
Diffstat (limited to 'src/mesa/swrast_setup/ss_context.c')
-rw-r--r-- | src/mesa/swrast_setup/ss_context.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index 2e92342e079..4b8c003c2e7 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -1,4 +1,4 @@ -/* $Id: ss_context.c,v 1.14 2001/07/12 22:09:21 keithw Exp $ */ +/* $Id: ss_context.c,v 1.15 2001/07/17 19:39:32 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -78,11 +78,19 @@ _swsetup_CreateContext( GLcontext *ctx ) void _swsetup_DestroyContext( GLcontext *ctx ) { - if (SWSETUP_CONTEXT(ctx)) { - if (SWSETUP_CONTEXT(ctx)->verts) - ALIGN_FREE(SWSETUP_CONTEXT(ctx)->verts); + SScontext *swsetup = SWSETUP_CONTEXT(ctx); + + if (swsetup) { + if (swsetup->verts) + ALIGN_FREE(swsetup->verts); + + if (swsetup->ChanSecondaryColor.Ptr) + ALIGN_FREE(swsetup->ChanSecondaryColor.Ptr); - FREE(SWSETUP_CONTEXT(ctx)); + if (swsetup->ChanColor.Ptr) + ALIGN_FREE(swsetup->ChanColor.Ptr); + + FREE(swsetup); ctx->swsetup_context = 0; } } |