projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc7f6f6
)
Avoid segfaults due to frame image cache being absent
author
Eli Zaretskii
<eliz@gnu.org>
Wed, 16 Mar 2016 17:04:16 +0000
(19:04 +0200)
committer
Eli Zaretskii
<eliz@gnu.org>
Wed, 16 Mar 2016 17:04:16 +0000
(19:04 +0200)
* src/image.c (cache_image): If the frame doesn't have an image
cache, create it. (Bug#23028)
src/image.c
patch
|
blob
|
history
diff --git
a/src/image.c
b/src/image.c
index a44b90b78e7f6b6d1dd4fb77844d68774e4d481c..e8418b840c60bbd6f525aeea68e8b585f2eb72db 100644
(file)
--- a/
src/image.c
+++ b/
src/image.c
@@
-1830,6
+1830,9
@@
cache_image (struct frame *f, struct image *img)
struct image_cache *c = FRAME_IMAGE_CACHE (f);
ptrdiff_t i;
+ if (!c)
+ c = FRAME_IMAGE_CACHE (f) = make_image_cache ();
+
/* Find a free slot in c->images. */
for (i = 0; i < c->used; ++i)
if (c->images[i] == NULL)