aboutsummaryrefslogtreecommitdiffstats
path: root/w3mimgdisplay.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-12-25 16:14:45 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-12-25 16:14:45 +0000
commitd31151945a1f781e5eb674f0b2ad995040ed5c83 (patch)
treebd665cd0f59430c0081ceec3381e2eddad04e23d /w3mimgdisplay.c
parent[w3m-dev 03601] Re: meta refresh (diff)
downloadw3m-d31151945a1f781e5eb674f0b2ad995040ed5c83.tar.gz
w3m-d31151945a1f781e5eb674f0b2ad995040ed5c83.zip
[w3m-dev 03602] Re: w3mimgdisplay core dump
* w3mimgdisplay.c (DrawImage): check load_image, imageBuf[n].pixmap * w3mimg/fb/fb_w3mimg.c (w3mfb_show_image): check img->pixmap * w3mimg/x11/x11_w3mimg.c (x11_show_image): check img->pixmap From: Hiroyuki Ito <hito@crl.go.jp>
Diffstat (limited to 'w3mimgdisplay.c')
-rw-r--r--w3mimgdisplay.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/w3mimgdisplay.c b/w3mimgdisplay.c
index ad52671..35bd1d3 100644
--- a/w3mimgdisplay.c
+++ b/w3mimgdisplay.c
@@ -1,4 +1,4 @@
-/* $Id: w3mimgdisplay.c,v 1.10 2002/11/27 16:46:34 ukai Exp $ */
+/* $Id: w3mimgdisplay.c,v 1.11 2002/12/25 16:14:45 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -263,10 +263,12 @@ DrawImage(char *buf, int redraw)
imageBuf[n].pixmap = NULL;
}
- w_op->load_image(w_op, &imageBuf[n], p, w, h);
+ if (w_op->load_image(w_op, &imageBuf[n], p, w, h) == 0)
+ imageBuf[n].pixmap = NULL;
draw_image:
- w_op->show_image(w_op, &imageBuf[n], sx, sy, sw, sh, x, y);
+ if (imageBuf[n].pixmap)
+ w_op->show_image(w_op, &imageBuf[n], sx, sy, sw, sh, x, y);
}
void