summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-04-03 08:24:10 -0700
committerEli Zaretskii <eliz@gnu.org>2019-01-05 11:52:40 +0200
commite0862eda47c549850a43f09d12882849a2073f93 (patch)
treea2be137ff66ff3b78ed6ca881f9d99b38a94ad63
parent0ecff00bc19c0f8e1b2c0b552a7a686525377dad (diff)
downloademacs-e0862eda47c549850a43f09d12882849a2073f93.tar.gz
Work around GC+Cairo bug
Workaround suggested by Robert Pluim (Bug#20890#13). * src/ftfont.c (ftfont_close) [USE_CAIRO]: Do nothing if GC is in progress.
-rw-r--r--src/ftfont.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ftfont.c b/src/ftfont.c
index 4382fd02211..bdb1dff8cb9 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -1246,6 +1246,12 @@ ftfont_close (struct font *font)
/* FIXME: Although this function can be called while garbage-collecting,
the function assumes that Lisp data structures are properly-formed.
This invalid assumption can lead to core dumps (Bug#20890). */
+#ifdef USE_CAIRO
+ /* Although this works around Bug#20890, it is probably not the
+ right thing to do. */
+ if (gc_in_progress)
+ return;
+#endif
struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
Lisp_Object val, cache;