diff options
| author | Eli Zaretskii | 2019-02-04 19:42:33 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-02-04 19:42:33 +0200 |
| commit | ef17247fe9cab2d59e470daad24314c868248b0a (patch) | |
| tree | bdbc2082ba69afdfa637d7dbe44e9b9803b21a0d /src/image.c | |
| parent | f33a5dc9475ae43bb2477e648befd6a893d216f1 (diff) | |
| download | emacs-ef17247fe9cab2d59e470daad24314c868248b0a.tar.gz emacs-ef17247fe9cab2d59e470daad24314c868248b0a.zip | |
Avoid segfaults due to image cache being cleared during redisplay
* src/xdisp.c (redisplay_internal): Set the
inhibit_clear_image_cache flag of a frame while its windows
are being redisplayed, and reset the flag after the call top
update_frame returns.
* src/image.c (clear_image_cache): Do nothing if the frame's
inhibit_clear_image_cache flag is set. (Bug#34256)
* src/frame.h (struct frame): New flag inhibit_clear_image_cache.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c index 57bbf3cdb93..642bf671520 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1554,7 +1554,7 @@ clear_image_cache (struct frame *f, Lisp_Object filter) | |||
| 1554 | { | 1554 | { |
| 1555 | struct image_cache *c = FRAME_IMAGE_CACHE (f); | 1555 | struct image_cache *c = FRAME_IMAGE_CACHE (f); |
| 1556 | 1556 | ||
| 1557 | if (c) | 1557 | if (c && !f->inhibit_clear_image_cache) |
| 1558 | { | 1558 | { |
| 1559 | ptrdiff_t i, nfreed = 0; | 1559 | ptrdiff_t i, nfreed = 0; |
| 1560 | 1560 | ||