diff options
| author | Paul Eggert | 2018-04-03 08:24:10 -0700 |
|---|---|---|
| committer | Eli Zaretskii | 2019-01-05 11:52:40 +0200 |
| commit | e0862eda47c549850a43f09d12882849a2073f93 (patch) | |
| tree | a2be137ff66ff3b78ed6ca881f9d99b38a94ad63 /src | |
| parent | 0ecff00bc19c0f8e1b2c0b552a7a686525377dad (diff) | |
| download | emacs-e0862eda47c549850a43f09d12882849a2073f93.tar.gz emacs-e0862eda47c549850a43f09d12882849a2073f93.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftfont.c | 6 |
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) | |||
| 1246 | /* FIXME: Although this function can be called while garbage-collecting, | 1246 | /* FIXME: Although this function can be called while garbage-collecting, |
| 1247 | the function assumes that Lisp data structures are properly-formed. | 1247 | the function assumes that Lisp data structures are properly-formed. |
| 1248 | This invalid assumption can lead to core dumps (Bug#20890). */ | 1248 | This invalid assumption can lead to core dumps (Bug#20890). */ |
| 1249 | #ifdef USE_CAIRO | ||
| 1250 | /* Although this works around Bug#20890, it is probably not the | ||
| 1251 | right thing to do. */ | ||
| 1252 | if (gc_in_progress) | ||
| 1253 | return; | ||
| 1254 | #endif | ||
| 1249 | 1255 | ||
| 1250 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; | 1256 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; |
| 1251 | Lisp_Object val, cache; | 1257 | Lisp_Object val, cache; |