From 96ad0af7411d61d6ae3e7afcab1b3996dd0ef1d4 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sun, 21 Nov 2010 19:39:42 -0500 Subject: [PATCH] Fix image cache marking bug (Bug#6301). * src/alloc.c (mark_terminals): Ensure that the image cache is marked even if the terminal object was marked earlier (Bug#6301). --- src/ChangeLog | 5 +++++ src/alloc.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f986c03cc14..0aa7e869c39 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-11-22 YAMAMOTO Mitsuharu + + * alloc.c (mark_terminals): Ensure that the image cache is marked + even if the terminal object was marked earlier (Bug#6301). + 2010-11-21 Chong Yidong * editfns.c (Fbyte_to_string): Signal an error arg is not a byte. diff --git a/src/alloc.c b/src/alloc.c index da63fe0f82b..4d19d3ac479 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5771,13 +5771,14 @@ mark_terminals (void) for (t = terminal_list; t; t = t->next_terminal) { eassert (t->name != NULL); - if (!VECTOR_MARKED_P (t)) - { #ifdef HAVE_WINDOW_SYSTEM - mark_image_cache (t->image_cache); + /* If a terminal object is reachable from a stacpro'ed object, + it might have been marked already. Make sure the image cache + gets marked. */ + mark_image_cache (t->image_cache); #endif /* HAVE_WINDOW_SYSTEM */ - mark_vectorlike ((struct Lisp_Vector *)t); - } + if (!VECTOR_MARKED_P (t)) + mark_vectorlike ((struct Lisp_Vector *)t); } } -- 2.39.2