From 5a80236fc8817e3b7fabcba233246ec862758a29 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 11 Dec 2013 19:06:04 +0400 Subject: [PATCH] * nsterm.m (x_free_frame_resources): * term.c (tty_free_frame_resources): * xterm.c (x_free_frame_resources): Do not check for non-NULL face cache because it's implied by free_frame_faces anyway. * w32term.c (x_free_frame_resources): Likewise. Do not call free_frame_faces twice. --- src/ChangeLog | 9 +++++++++ src/nsterm.m | 4 +--- src/term.c | 9 ++------- src/w32term.c | 6 +----- src/xterm.c | 3 +-- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8c19c83378a..9f3161a220d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2013-12-11 Dmitry Antipov + + * nsterm.m (x_free_frame_resources): + * term.c (tty_free_frame_resources): + * xterm.c (x_free_frame_resources): Do not check for non-NULL + face cache because it's implied by free_frame_faces anyway. + * w32term.c (x_free_frame_resources): Likewise. Do not call + free_frame_faces twice. + 2013-12-11 Rüdiger Sonderfeld * editfns.c (Fformat_time_string): Mention %F in the doc. diff --git a/src/nsterm.m b/src/nsterm.m index 9c87923f32e..733c05ae53a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1155,9 +1155,7 @@ x_free_frame_resources (struct frame *f) block_input (); free_frame_menubar (f); - - if (FRAME_FACE_CACHE (f)) - free_frame_faces (f); + free_frame_faces (f); if (f == dpyinfo->x_focus_frame) dpyinfo->x_focus_frame = 0; diff --git a/src/term.c b/src/term.c index 85a994bf2bc..7b6cb41e23d 100644 --- a/src/term.c +++ b/src/term.c @@ -3833,10 +3833,7 @@ static void tty_free_frame_resources (struct frame *f) { eassert (FRAME_TERMCAP_P (f)); - - if (FRAME_FACE_CACHE (f)) - free_frame_faces (f); - + free_frame_faces (f); xfree (f->output_data.tty); } @@ -3848,9 +3845,7 @@ static void tty_free_frame_resources (struct frame *f) { eassert (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)); - - if (FRAME_FACE_CACHE (f)) - free_frame_faces (f); + free_frame_faces (f); } #endif /* MSDOS */ diff --git a/src/w32term.c b/src/w32term.c index ba336b5c65b..ec11bc11535 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -6080,17 +6080,13 @@ x_free_frame_resources (struct frame *f) /* We must free faces before destroying windows because some font-driver (e.g. xft) access a window while finishing a face. */ - if (FRAME_FACE_CACHE (f)) - free_frame_faces (f); + free_frame_faces (f); if (FRAME_W32_WINDOW (f)) my_destroy_window (f, FRAME_W32_WINDOW (f)); free_frame_menubar (f); - if (FRAME_FACE_CACHE (f)) - free_frame_faces (f); - xfree (f->output_data.w32); f->output_data.w32 = NULL; diff --git a/src/xterm.c b/src/xterm.c index 27d3d4a4bd1..2c5c01baa84 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9129,8 +9129,7 @@ x_free_frame_resources (struct frame *f) /* We must free faces before destroying windows because some font-driver (e.g. xft) access a window while finishing a face. */ - if (FRAME_FACE_CACHE (f)) - free_frame_faces (f); + free_frame_faces (f); if (f->output_data.x->icon_desc) XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->icon_desc); -- 2.39.2