diff options
author | Simon Rettberg | 2019-02-18 11:55:41 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:41 +0100 |
commit | ae69a754244c4e475c8d2591772ca8e005071d83 (patch) | |
tree | 58b3fa7abc2dcfe3c23e1c0ce108950c720826ab /hacks/glx/gltext.c | |
parent | Update gitignore (diff) | |
download | xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.gz xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.xz xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.zip |
Update to 5.42
Diffstat (limited to 'hacks/glx/gltext.c')
-rw-r--r-- | hacks/glx/gltext.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hacks/glx/gltext.c b/hacks/glx/gltext.c index 276c448..ab5a512 100644 --- a/hacks/glx/gltext.c +++ b/hacks/glx/gltext.c @@ -573,7 +573,7 @@ draw_text (ModeInfo *mi) if (!tp->glx_context) return; - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(tp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *tp->glx_context); if (tp->reload) { @@ -650,8 +650,18 @@ ENTRYPOINT void free_text(ModeInfo * mi) { text_configuration *tp = &tps[MI_SCREEN(mi)]; + + if (!tp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *tp->glx_context); + if (tp->tc) textclient_close (tp->tc); + if (tp->text) free (tp->text); + if (tp->trackball) gltrackball_free (tp->trackball); + if (tp->rot) free_rotator (tp->rot); + if (tp->rot2) free_rotator (tp->rot2); + if (tp->colors) free (tp->colors); + if (glIsList(tp->text_list)) glDeleteLists(tp->text_list, 1); } |