diff options
| author | Chong Yidong | 2010-11-05 14:28:19 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-11-05 14:28:19 -0400 |
| commit | be3faa809a959dcd7e985a0d536ac815d5138976 (patch) | |
| tree | e183133c72d2861c068071956845a249c63c5344 /src/image.c | |
| parent | a7702be668334560736769e99cbfc9cd01cdcf2b (diff) | |
| download | emacs-be3faa809a959dcd7e985a0d536ac815d5138976.tar.gz emacs-be3faa809a959dcd7e985a0d536ac815d5138976.zip | |
Fix the fix for Bug#6426 (Bug#7210), avoiding frame garbaging loop.
* image.c (free_image): Don't garbage the frame here, since this
function can be called while redisplaying (Bug#7210).
(uncache_image): Garbage the frame here (Bug#6426).
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/image.c b/src/image.c index e7db3a7df1b..0fa0a0cd064 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1094,10 +1094,6 @@ free_image (f, img) | |||
| 1094 | /* Free resources, then free IMG. */ | 1094 | /* Free resources, then free IMG. */ |
| 1095 | img->type->free (f, img); | 1095 | img->type->free (f, img); |
| 1096 | xfree (img); | 1096 | xfree (img); |
| 1097 | |||
| 1098 | /* As display glyphs may still be referring to the image ID, we | ||
| 1099 | must garbage the frame (Bug#6426). */ | ||
| 1100 | SET_FRAME_GARBAGED (f); | ||
| 1101 | } | 1097 | } |
| 1102 | } | 1098 | } |
| 1103 | 1099 | ||
| @@ -1544,7 +1540,12 @@ uncache_image (f, spec) | |||
| 1544 | { | 1540 | { |
| 1545 | struct image *img = search_image_cache (f, spec, sxhash (spec, 0)); | 1541 | struct image *img = search_image_cache (f, spec, sxhash (spec, 0)); |
| 1546 | if (img) | 1542 | if (img) |
| 1547 | free_image (f, img); | 1543 | { |
| 1544 | free_image (f, img); | ||
| 1545 | /* As display glyphs may still be referring to the image ID, we | ||
| 1546 | must garbage the frame (Bug#6426). */ | ||
| 1547 | SET_FRAME_GARBAGED (f); | ||
| 1548 | } | ||
| 1548 | } | 1549 | } |
| 1549 | 1550 | ||
| 1550 | 1551 | ||