Mercurial > emacs
diff src/image.c @ 83436:f67e432d150c
Fix crash in lookup_image on termcap frames.
* src/xdisp.c (get_glyph_string_clip_rects): Add extra parentheses and
braces to prevent compiler warnings.
(calc_pixel_width_or_height): Add xassert to check that the
frame is alive. Don't call `lookup_image' on a termcap frame.
* image.c (lookup_image): Don't initialize `c' until the xasserts have
been run.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-476
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Fri, 30 Dec 2005 05:29:31 +0000 |
parents | 9574f135f272 |
children | b98066f4aa10 |
line wrap: on
line diff
--- a/src/image.c Fri Dec 30 05:28:31 2005 +0000 +++ b/src/image.c Fri Dec 30 05:29:31 2005 +0000 @@ -1722,7 +1722,7 @@ struct frame *f; Lisp_Object spec; { - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); + struct image_cache *c; struct image *img; int i; unsigned hash; @@ -1734,6 +1734,8 @@ xassert (FRAME_WINDOW_P (f)); xassert (valid_image_p (spec)); + c = FRAME_X_IMAGE_CACHE (f); + GCPRO1 (spec); /* Look up SPEC in the hash table of the image cache. */