diff options
author | Eric Anholt <eric@anholt.net> | 2007-01-04 12:24:48 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-01-04 12:24:48 -0800 |
commit | 7d2ec92170ebbdfa10a05734cb7cfaac97d19d65 (patch) | |
tree | 04b65e06ab13a9cc66d7baab89fe13a38a9bba2e /GL | |
parent | aab2ca204279b638c7e5bb6b8427c58be9704c57 (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.c | 4 |
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; } |