summaryrefslogtreecommitdiff
path: root/GL
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-01-04 12:24:48 -0800
committerEric Anholt <eric@anholt.net>2007-01-04 12:24:48 -0800
commit7d2ec92170ebbdfa10a05734cb7cfaac97d19d65 (patch)
tree04b65e06ab13a9cc66d7baab89fe13a38a9bba2e /GL
parentaab2ca204279b638c7e5bb6b8427c58be9704c57 (diff)
Keep track of how many visuals we set up for GLcore, to avoid an invalid free.
The proper fix would involve actually setting up the ARGB visual for GLcore, but I just want the server to not crash at exit.
Diffstat (limited to 'GL')
-rw-r--r--GL/mesa/X/xf86glx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/GL/mesa/X/xf86glx.c b/GL/mesa/X/xf86glx.c
index 94959d628..47c87f6d9 100644
--- a/GL/mesa/X/xf86glx.c
+++ b/GL/mesa/X/xf86glx.c
@@ -78,6 +78,7 @@ typedef struct __GLXMESAdrawable __GLXMESAdrawable;
struct __GLXMESAscreen {
__GLXscreen base;
int index;
+ int num_vis;
XMesaVisual *xm_vis;
};
@@ -280,7 +281,7 @@ __glXMesaScreenDestroy(__GLXscreen *screen)
__GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen;
int i;
- for (i = 0; i < screen->numVisuals; i++) {
+ for (i = 0; i < mesaScreen->num_vis; i++) {
if (mesaScreen->xm_vis[i])
XMesaDestroyVisual(mesaScreen->xm_vis[i]);
}
@@ -389,6 +390,7 @@ static void init_screen_visuals(__GLXMESAscreen *screen)
xfree(used);
+ screen->num_vis = pScreen->numVisuals;
screen->xm_vis = pXMesaVisual;
}