From f374520488d14e4403a9df52bc751de5e4ab8005 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 19 Apr 2005 08:34:50 +0000 Subject: [PATCH] (resolve_face_name): Use Fsafe_get to avoid redisplay loops in case of bad face property lists. Limit number of face alias lookups to 10 (in case of face alias loops). --- src/xfaces.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index 3ff8917ff91..d8ae7c2af19 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3211,17 +3211,19 @@ resolve_face_name (face_name) Lisp_Object face_name; { Lisp_Object aliased; + int alias_loop_max = 10; if (STRINGP (face_name)) face_name = intern (SDATA (face_name)); while (SYMBOLP (face_name)) { - aliased = Fget (face_name, Qface_alias); + aliased = Fsafe_get (face_name, Qface_alias); if (NILP (aliased)) break; - else - face_name = aliased; + if (--alias_loop_max == 0) + break; + face_name = aliased; } return face_name; -- 2.39.2