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/discoball.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'hacks/glx/discoball.c') diff --git a/hacks/glx/discoball.c b/hacks/glx/discoball.c index 4085c56..427d7e9 100644 --- a/hacks/glx/discoball.c +++ b/hacks/glx/discoball.c @@ -637,7 +637,7 @@ draw_ball (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); @@ -693,13 +693,17 @@ ENTRYPOINT void free_ball (ModeInfo *mi) { ball_configuration *bp = &bps[MI_SCREEN(mi)]; + if (!bp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); while (bp->tiles) { tile *t = bp->tiles->next; free (bp->tiles); bp->tiles = t; } - free (bp->rays); + if (bp->rays) free (bp->rays); + if (bp->trackball) gltrackball_free (bp->trackball); + if (bp->rot) free_rotator (bp->rot); } XSCREENSAVER_MODULE_2 ("Discoball", discoball, ball) -- cgit v1.2.3-55-g7522