]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around GC+Cairo bug
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Apr 2018 15:24:10 +0000 (08:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Apr 2018 15:24:38 +0000 (08:24 -0700)
Workaround suggested by Robert Pluim (Bug#20890#13).
* src/ftfont.c (ftfont_close) [USE_CAIRO]:
Do nothing if GC is in progress.

src/ftfont.c

index 84e4a303899dfe22a1928e940303a2cedfa08dea..fea00ffe41d9e272a7d5015e8a58fd5692ff7741 100644 (file)
@@ -1245,6 +1245,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;