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.
This commit is contained in:
parent
aab2ca2042
commit
7d2ec92170
|
@ -78,6 +78,7 @@ typedef struct __GLXMESAdrawable __GLXMESAdrawable;
|
||||||
struct __GLXMESAscreen {
|
struct __GLXMESAscreen {
|
||||||
__GLXscreen base;
|
__GLXscreen base;
|
||||||
int index;
|
int index;
|
||||||
|
int num_vis;
|
||||||
XMesaVisual *xm_vis;
|
XMesaVisual *xm_vis;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -280,7 +281,7 @@ __glXMesaScreenDestroy(__GLXscreen *screen)
|
||||||
__GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen;
|
__GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < screen->numVisuals; i++) {
|
for (i = 0; i < mesaScreen->num_vis; i++) {
|
||||||
if (mesaScreen->xm_vis[i])
|
if (mesaScreen->xm_vis[i])
|
||||||
XMesaDestroyVisual(mesaScreen->xm_vis[i]);
|
XMesaDestroyVisual(mesaScreen->xm_vis[i]);
|
||||||
}
|
}
|
||||||
|
@ -389,6 +390,7 @@ static void init_screen_visuals(__GLXMESAscreen *screen)
|
||||||
|
|
||||||
xfree(used);
|
xfree(used);
|
||||||
|
|
||||||
|
screen->num_vis = pScreen->numVisuals;
|
||||||
screen->xm_vis = pXMesaVisual;
|
screen->xm_vis = pXMesaVisual;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user