diff options
| author | Eli Zaretskii | 2024-08-24 12:07:02 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2024-08-24 12:07:02 +0300 |
| commit | 4211d85eec0858583bd9d35f8de9cd6e358d6c72 (patch) | |
| tree | 19dcf9e7f5b9a7d9941a731fca1236fd5b019f28 /src | |
| parent | 44c26140b6e86f67f99d4ed9cc30e95f46708641 (diff) | |
| download | emacs-4211d85eec0858583bd9d35f8de9cd6e358d6c72.tar.gz emacs-4211d85eec0858583bd9d35f8de9cd6e358d6c72.zip | |
Fix rare segfaults due to freed fontsets
* src/xfaces.c (recompute_basic_faces): Force complete
recalculation of all the faces. (Bug#72692)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 684b6ccfac7..34897817ffd 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -736,6 +736,11 @@ recompute_basic_faces (struct frame *f) | |||
| 736 | clear_face_cache (false); | 736 | clear_face_cache (false); |
| 737 | if (!realize_basic_faces (f)) | 737 | if (!realize_basic_faces (f)) |
| 738 | emacs_abort (); | 738 | emacs_abort (); |
| 739 | /* Force complete face recalculation next time we use the display | ||
| 740 | code, because realize_basic_faces could free the fontset used | ||
| 741 | by non-ASCII faces corresponding to ASCII faces of the basic | ||
| 742 | faces, and attempt to use that fontset might segfault. */ | ||
| 743 | f->face_change = true; | ||
| 739 | } | 744 | } |
| 740 | } | 745 | } |
| 741 | 746 | ||