summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-11-05 14:28:19 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-11-05 14:28:19 -0400
commitb93886ba9b6294815d7fc03357c5bd3d9f4d9149 (patch)
treed06678349c8df3bebc1a942b0571104bcd8cdc4e /src
parent556585778e06d2e8aa98bd826ec27d07fda1331c (diff)
downloademacs-b93886ba9b6294815d7fc03357c5bd3d9f4d9149.tar.gz
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')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/image.c11
2 files changed, 12 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4260890d7f8..e7a6ae77a17 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-05 Chong Yidong <cyd@stupidchicken.com>
+
+ * 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).
+
2010-11-04 Chong Yidong <cyd@stupidchicken.com>
* process.c (Fmake_network_process): Don't apply Bug#5173 fix for
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)
/* Free resources, then free IMG. */
img->type->free (f, img);
xfree (img);
-
- /* As display glyphs may still be referring to the image ID, we
- must garbage the frame (Bug#6426). */
- SET_FRAME_GARBAGED (f);
}
}
@@ -1544,7 +1540,12 @@ uncache_image (f, spec)
{
struct image *img = search_image_cache (f, spec, sxhash (spec, 0));
if (img)
- free_image (f, img);
+ {
+ free_image (f, img);
+ /* As display glyphs may still be referring to the image ID, we
+ must garbage the frame (Bug#6426). */
+ SET_FRAME_GARBAGED (f);
+ }
}