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/geodesicgears.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'hacks/glx/geodesicgears.c') diff --git a/hacks/glx/geodesicgears.c b/hacks/glx/geodesicgears.c index ecc7f26..3911b38 100644 --- a/hacks/glx/geodesicgears.c +++ b/hacks/glx/geodesicgears.c @@ -1325,7 +1325,7 @@ reshape_geodesic (ModeInfo *mi, int width, int height) h = height / (GLfloat) width; } - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); glViewport (0, y, (GLint) width, (GLint) height); @@ -1527,7 +1527,7 @@ draw_geodesic (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); if (bp->draw_time == 0) @@ -1790,11 +1790,13 @@ free_geodesic (ModeInfo *mi) geodesic_configuration *bp = &bps[MI_SCREEN(mi)]; if (!bp->glx_context) return; - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context)); - free_texture_font (bp->font); - free (bp->colors); - free_sphere_gears (mi); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); + if (bp->font) free_texture_font (bp->font); + if (bp->colors) free (bp->colors); + if (mi) free_sphere_gears (mi); if (bp->desc) free (bp->desc); + if (bp->trackball) gltrackball_free (bp->trackball); + if (bp->rot) free_rotator (bp->rot); } -- cgit v1.2.3-55-g7522