xorg-x11-server/commit-c09e68c

31 lines
867 B
Plaintext

commit c09e68ce30dabd6b7068b163b9d2382d85d0d0bc
Author: Adam Jackson <ajax@benzedrine.nwnk.net>
Date: Wed Apr 25 16:46:26 2007 -0400
Paper over a crash at exit during GLX teardown.
diff --git a/GL/mesa/X/xf86glx.c b/GL/mesa/X/xf86glx.c
index ecfa4d7..b50740c 100644
--- a/GL/mesa/X/xf86glx.c
+++ b/GL/mesa/X/xf86glx.c
@@ -258,12 +258,14 @@ __glXMesaScreenDestroy(__GLXscreen *scre
__GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen;
int i;
- for (i = 0; i < mesaScreen->num_vis; i++) {
- if (mesaScreen->xm_vis[i])
- XMesaDestroyVisual(mesaScreen->xm_vis[i]);
- }
+ if (mesaScreen->xm_vis) {
+ for (i = 0; i < mesaScreen->num_vis; i++) {
+ if (mesaScreen->xm_vis[i])
+ XMesaDestroyVisual(mesaScreen->xm_vis[i]);
+ }
- xfree(mesaScreen->xm_vis);
+ xfree(mesaScreen->xm_vis);
+ }
__glXScreenDestroy(screen);