diff options
author | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
commit | aa7530630e595b80d5db54655fd827b61edc0fd7 (patch) | |
tree | 048cb74072450c7592f254c3537ac8f252d09d73 /hacks/glx/crumbler.c | |
parent | Forgot one DPMS killing instance (diff) | |
parent | Update to 5.42 (diff) | |
download | xscreensaver-23.tar.gz xscreensaver-23.tar.xz xscreensaver-23.zip |
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/glx/crumbler.c')
-rw-r--r-- | hacks/glx/crumbler.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/hacks/glx/crumbler.c b/hacks/glx/crumbler.c index 8e783db..b7b8acc 100644 --- a/hacks/glx/crumbler.c +++ b/hacks/glx/crumbler.c @@ -747,7 +747,7 @@ draw_crumbler (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); tick_crumbler (mi); @@ -861,12 +861,14 @@ free_crumbler (ModeInfo *mi) { crumbler_configuration *bp = &bps[MI_SCREEN(mi)]; int i; - free (bp->trackball); - free (bp->rot); - free (bp->colors); + 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); for (i = 0; i < bp->nchunks; i++) free_chunk (bp->chunks[i]); - free (bp->chunks); + if (bp->chunks) free (bp->chunks); } |