aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorKaroly Lorentey <[email protected]>2005-12-30 05:29:31 +0000
committerKaroly Lorentey <[email protected]>2005-12-30 05:29:31 +0000
commit4a0e3f08607bbe80ad9dee2c441286f6ad695d0a (patch)
tree2a050c8ee5c8df1cb89fe68c69aef5178422cf65 /src/image.c
parentea161626590293c1128cb327f1111a3c1500fe65 (diff)
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: [email protected]/emacs--multi-tty--0--patch-476
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c
index 579c04e6f4..0ed50ac653 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1722,7 +1722,7 @@ lookup_image (f, spec)
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 @@ lookup_image (f, spec)
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. */