summaryrefslogtreecommitdiff
path: root/src/fe-text/term-terminfo.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-02-10 15:01:00 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-02-10 15:01:00 +0000
commit0c209a68998eebf33aa5a4ed7da8d7fcc27f288b (patch)
treec2336f5f4dcbff309941edaad2ac67bd0252325e /src/fe-text/term-terminfo.c
parent57629dcadcfca4a0f62e921a76d922f2a4dae0f3 (diff)
downloadirssi-0c209a68998eebf33aa5a4ed7da8d7fcc27f288b.zip
atexit(term_deinit)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2424 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/term-terminfo.c')
-rw-r--r--src/fe-text/term-terminfo.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c
index acf5430d..a1b106a7 100644
--- a/src/fe-text/term-terminfo.c
+++ b/src/fe-text/term-terminfo.c
@@ -95,15 +95,19 @@ int term_init(void)
term_lines_empty = g_new0(char, term_height);
term_common_init();
+ g_atexit(term_deinit);
return TRUE;
}
void term_deinit(void)
{
- g_source_remove(redraw_tag);
+ if (current_term != NULL) {
+ g_source_remove(redraw_tag);
- term_common_deinit();
- terminfo_core_deinit(current_term);
+ term_common_deinit();
+ terminfo_core_deinit(current_term);
+ current_term = NULL;
+ }
}
static void term_move_real(void)