1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-30 03:26:23 -04:00

festival: stop_festival when freeing doc_view.

This commit is contained in:
Witold Filipczyk 2007-03-07 14:18:48 +01:00 committed by Witold Filipczyk
parent 3a56964990
commit 17385a8d7f
4 changed files with 10 additions and 5 deletions

View File

@ -35,6 +35,7 @@
#include "util/error.h"
#include "util/memory.h"
#include "util/string.h"
#include "viewer/text/festival.h"
#include "viewer/text/view.h"
#include "viewer/text/vs.h"
@ -473,6 +474,9 @@ render_document_frames(struct session *ses, int no_cache)
detach_formatted(doc_view);
del_from_list(doc_view);
#ifdef HAVE_FORK
stop_festival(doc_view);
#endif
mem_free(doc_view);
doc_view = prev_doc_view;
}

View File

@ -9,6 +9,8 @@
struct document;
struct view_state;
/* Remember to call stop_festival before freeing document_view. --witekfl */
struct document_view {
LIST_HEAD(struct document_view);

View File

@ -47,6 +47,7 @@
#include "util/string.h"
#include "util/time.h"
#include "viewer/text/draw.h"
#include "viewer/text/festival.h"
#include "viewer/text/form.h"
#include "viewer/text/link.h"
#include "viewer/text/view.h"
@ -1150,6 +1151,9 @@ destroy_session(struct session *ses)
free_files(ses);
if (ses->doc_view) {
detach_formatted(ses->doc_view);
#ifdef HAVE_FORK
stop_festival(ses->doc_view);
#endif
mem_free(ses->doc_view);
}

View File

@ -22,7 +22,6 @@
#include "util/error.h"
#include "util/memory.h"
#include "util/lists.h"
#include "viewer/text/festival.h"
#include "viewer/text/link.h"
#include "viewer/text/view.h"
@ -175,10 +174,6 @@ really_close_tab(struct session *ses)
struct terminal *term = ses->tab->term;
struct window *current_tab = get_current_tab(term);
#ifdef HAVE_FORK
stop_festival(ses->doc_view);
#endif
if (ses->tab == current_tab) {
int tabs_count = number_of_tabs(term);