summaryrefslogtreecommitdiffstats
path: root/hacks/glx/hexstrut.c
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/glx/hexstrut.c')
-rw-r--r--hacks/glx/hexstrut.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hacks/glx/hexstrut.c b/hacks/glx/hexstrut.c
index a547a76..ba76d86 100644
--- a/hacks/glx/hexstrut.c
+++ b/hacks/glx/hexstrut.c
@@ -450,7 +450,7 @@ draw_hexstrut (ModeInfo *mi)
if (!bp->glx_context)
return;
- glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context));
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context);
glShadeModel(GL_SMOOTH);
@@ -496,6 +496,13 @@ ENTRYPOINT void
free_hexstrut (ModeInfo *mi)
{
hexstrut_configuration *bp = &bps[MI_SCREEN(mi)];
+
+ if (!bp->glx_context) return;
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context);
+
+ if (bp->trackball) gltrackball_free (bp->trackball);
+ if (bp->rot) free_rotator (bp->rot);
+ if (bp->colors) free (bp->colors);
while (bp->triangles)
{
triangle *t = bp->triangles->next;