mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 16:10:09 +01:00
fixed dangling pointer problem (Chris Burghart)
This commit is contained in:
parent
04ec0fd71e
commit
9bed64cbf1
2 changed files with 12 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
$Id: VERSIONS,v 1.70 2001/08/28 23:12:37 brianp Exp $
|
||||
$Id: VERSIONS,v 1.71 2001/08/31 04:30:14 brianp Exp $
|
||||
|
||||
|
||||
Mesa Version History
|
||||
|
|
@ -891,3 +891,4 @@ Mesa Version History
|
|||
- fixed glDrawRangeElements() bug
|
||||
- fixed a glPush/PopAttrib() bug related to texture binding
|
||||
- flat-shaded, textured lines were broken
|
||||
- fixed a dangling pointer problem in the XMesa code (Chris Burghart)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: xm_api.c,v 1.26 2001/08/28 22:46:22 brianp Exp $ */
|
||||
/* $Id: xm_api.c,v 1.27 2001/08/31 04:30:14 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -2032,6 +2032,10 @@ GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer,
|
|||
if (drawBuffer->FXctx) {
|
||||
fxMesaMakeCurrent(drawBuffer->FXctx);
|
||||
|
||||
/* Disassociate drawBuffer's current context from drawBuffer */
|
||||
if (drawBuffer->xm_context)
|
||||
drawBuffer->xm_context->xm_buffer = NULL;
|
||||
|
||||
/* Disassociate old buffer from this context */
|
||||
if (c->xm_buffer)
|
||||
c->xm_buffer->xm_context = NULL;
|
||||
|
|
@ -2054,9 +2058,14 @@ GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer,
|
|||
return GL_TRUE;
|
||||
}
|
||||
|
||||
/* Disassociate drawBuffer's current context from drawBuffer */
|
||||
if (drawBuffer->xm_context)
|
||||
drawBuffer->xm_context->xm_buffer = NULL;
|
||||
|
||||
/* Disassociate old buffer with this context */
|
||||
if (c->xm_buffer)
|
||||
c->xm_buffer->xm_context = NULL;
|
||||
|
||||
drawBuffer->xm_context = c; /* Associate the context with this buffer */
|
||||
|
||||
c->xm_buffer = drawBuffer;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue