aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c
index 6ecf6a70fe2..25d5af8a8d5 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2329,8 +2329,14 @@ lookup_image (struct frame *f, Lisp_Object spec, int face_id)
2329 struct image *img; 2329 struct image *img;
2330 EMACS_UINT hash; 2330 EMACS_UINT hash;
2331 2331
2332 struct face *face = (face_id >= 0) ? FACE_FROM_ID (f, face_id) 2332 if (FRAME_FACE_CACHE (f) == NULL)
2333 : FACE_FROM_ID (f, DEFAULT_FACE_ID); 2333 init_frame_faces (f);
2334 if (FRAME_FACE_CACHE (f)->used == 0)
2335 recompute_basic_faces (f);
2336 if (face_id < 0 || face_id >= FRAME_FACE_CACHE (f)->used)
2337 face_id = DEFAULT_FACE_ID;
2338
2339 struct face *face = FACE_FROM_ID (f, face_id);
2334 unsigned long foreground = FACE_COLOR_TO_PIXEL (face->foreground, f); 2340 unsigned long foreground = FACE_COLOR_TO_PIXEL (face->foreground, f);
2335 unsigned long background = FACE_COLOR_TO_PIXEL (face->background, f); 2341 unsigned long background = FACE_COLOR_TO_PIXEL (face->background, f);
2336 2342