From ae69a754244c4e475c8d2591772ca8e005071d83 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 18 Feb 2019 11:55:41 +0100 Subject: Update to 5.42 --- hacks/glx/hydrostat.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'hacks/glx/hydrostat.c') diff --git a/hacks/glx/hydrostat.c b/hacks/glx/hydrostat.c index faf15a0..99bc6cd 100644 --- a/hacks/glx/hydrostat.c +++ b/hacks/glx/hydrostat.c @@ -754,7 +754,7 @@ draw_hydrostat (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); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -797,11 +797,21 @@ free_hydrostat (ModeInfo *mi) { hydrostat_configuration *bp = &bps[MI_SCREEN(mi)]; int i; - if (!bp->squids) - return; - for (i = 0; i < MI_COUNT(mi); i++) - free_squid (bp->squids[i]); - free (bp->squids); + + if (!bp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); + +# ifdef USE_TRACKBALL + if (bp->trackball) gltrackball_free (bp->trackball); +# endif + if (bp->squids) + { + for (i = 0; i < MI_COUNT(mi); i++) + free_squid (bp->squids[i]); + free (bp->squids); + } + + if (glIsList(bp->head)) glDeleteLists(bp->head, 1); } XSCREENSAVER_MODULE ("Hydrostat", hydrostat) -- cgit v1.2.3-55-g7522